:root {
    --bg: #07080a;
    --bg-soft: #101114;
    --surface: #15171b;
    --surface-strong: #1d2026;
    --text: #f7f8fa;
    --muted: #b7bcc6;
    --line: rgba(247, 248, 250, 0.14);
    --gold: #f4b321;
    --gold-strong: #ffca3d;
    --on-gold: #11100e;
    --green: #40d1b1;
    --teal: #39a6b7;
    --blue: #71b8ff;
    --rose: #ff7a9a;
    --shadow: 0 14px 42px rgba(0, 0, 0, 0.32);
}

:root[data-theme="light"] {
    --bg: #f6f7f9;
    --bg-soft: #e9edf2;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --text: #121417;
    --muted: #565d68;
    --line: rgba(18, 20, 23, 0.14);
    --gold: #c98f12;
    --gold-strong: #a97300;
    --on-gold: #11100e;
    --green: #167c68;
    --teal: #176f7d;
    --blue: #1967a8;
    --rose: #b9345b;
    --shadow: 0 14px 34px rgba(19, 25, 34, 0.12);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 70% -10%, rgba(64, 209, 177, 0.08), transparent 30rem),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

main,
.site-header,
.messages,
.back-button,
.mobile-tabbar {
    position: relative;
}

main {
    z-index: 1;
}

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

.public-page .music-ambient {
    z-index: 0;
}

.public-page main {
    position: relative;
    z-index: 1;
}

.piano-keys-ambient {
    position: absolute;
    right: -4.5rem;
    top: 8.4rem;
    width: 18.2rem;
    height: 5.3rem;
    border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
    border-radius: 8px;
    opacity: 0.38;
    overflow: hidden;
    transform: rotate(-9deg);
    background:
        linear-gradient(90deg,
            rgba(244, 179, 33, 0.24) 0 7.15%,
            rgba(64, 209, 177, 0.22) 7.15% 14.3%,
            rgba(113, 184, 255, 0.2) 14.3% 21.45%,
            rgba(255, 122, 154, 0.18) 21.45% 28.6%,
            rgba(255, 202, 61, 0.22) 28.6% 35.75%,
            rgba(57, 166, 183, 0.2) 35.75% 42.9%,
            rgba(64, 209, 177, 0.22) 42.9% 50.05%,
            rgba(244, 179, 33, 0.24) 50.05% 57.2%,
            rgba(113, 184, 255, 0.2) 57.2% 64.35%,
            rgba(255, 122, 154, 0.18) 64.35% 71.5%,
            rgba(255, 202, 61, 0.22) 71.5% 78.65%,
            rgba(57, 166, 183, 0.2) 78.65% 85.8%,
            rgba(64, 209, 177, 0.22) 85.8% 92.95%,
            rgba(244, 179, 33, 0.24) 92.95% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0 1.25rem, rgba(40, 42, 48, 0.32) 1.25rem 1.32rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.1));
    background-blend-mode: screen, normal, normal;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
    animation: piano-drift 14s ease-in-out infinite alternate;
}

.piano-keys-ambient-left {
    left: -5.4rem;
    right: auto;
    top: auto;
    bottom: 13vh;
    opacity: 0.3;
    transform: rotate(8deg);
    animation: piano-drift-left 16s ease-in-out infinite alternate;
}

.piano-keys-ambient::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.05rem;
    width: 0.62rem;
    height: 3.05rem;
    border-radius: 0 0 4px 4px;
    background: rgba(0, 0, 0, 0.82);
    box-shadow:
        1.32rem 0 0 rgba(0, 0, 0, 0.82),
        3.96rem 0 0 rgba(0, 0, 0, 0.82),
        5.28rem 0 0 rgba(0, 0, 0, 0.82),
        6.6rem 0 0 rgba(0, 0, 0, 0.82),
        9.24rem 0 0 rgba(0, 0, 0, 0.82),
        10.56rem 0 0 rgba(0, 0, 0, 0.82),
        13.2rem 0 0 rgba(0, 0, 0, 0.82),
        14.52rem 0 0 rgba(0, 0, 0, 0.82),
        15.84rem 0 0 rgba(0, 0, 0, 0.82);
    z-index: 4;
}

.ambient-note {
    position: absolute;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.1rem;
    opacity: 0;
    animation: ambient-note-float 6.9s ease-in-out infinite;
}

.ambient-note::before {
    content: "\266A";
}

.ambient-note-b::before {
    content: "\266B";
}

.ambient-note-a {
    left: 7vw;
    top: 26vh;
}

.ambient-note-b {
    right: 14vw;
    top: 54vh;
    animation-delay: 1.8s;
}

.ambient-note-c {
    left: 19vw;
    bottom: 13vh;
    animation-delay: 3.2s;
}

.ambient-note-d {
    right: 8vw;
    top: 22vh;
    font-size: 1.45rem;
    animation-delay: 4.4s;
}

.ambient-note-e {
    left: 42vw;
    bottom: 9vh;
    font-size: 1.55rem;
    animation-delay: 5.7s;
}

.ambient-note-d::before {
    content: "\266C";
}

.ambient-note-depth {
    font-size: 3rem;
    opacity: 0;
    filter: blur(0.2px);
    animation: ambient-note-depth-float 5.9s ease-in-out infinite;
}

.ambient-note-f {
    left: 12vw;
    top: 62vh;
    animation-delay: 0.7s;
}

.ambient-note-g {
    right: 30vw;
    top: 18vh;
    animation-delay: 2.1s;
}

.ambient-note-h {
    right: 5vw;
    bottom: 17vh;
    animation-delay: 3.8s;
}

.ambient-note-g::before {
    content: "\266B";
}

.ambient-note-i {
    left: 55vw;
    top: 36vh;
    font-size: 1.42rem;
    animation-delay: 0.9s;
}

.ambient-note-j {
    left: 4vw;
    bottom: 34vh;
    font-size: 1.7rem;
    animation-delay: 4.9s;
}

.ambient-note-k {
    right: 18vw;
    bottom: 8vh;
    font-size: 2.35rem;
    animation-delay: 1.25s;
}

.ambient-note-l {
    left: 22vw;
    bottom: 10vh;
    font-size: 1.35rem;
    animation-delay: 2.8s;
}

.ambient-note-m {
    right: 38vw;
    top: 12vh;
    font-size: 2.6rem;
    animation-delay: 3.4s;
}

.ambient-note-n {
    left: 76vw;
    top: 58vh;
    font-size: 2rem;
    animation-delay: 5.2s;
}

.ambient-note-o {
    left: 64vw;
    bottom: 24vh;
    font-size: 1.55rem;
    animation-delay: 1.45s;
}

.ambient-note-p {
    left: 8vw;
    top: 44vh;
    font-size: 2.45rem;
    animation-delay: 2.45s;
}

.ambient-note-q {
    right: 24vw;
    top: 72vh;
    font-size: 1.7rem;
    animation-delay: 4.15s;
}

.ambient-note-r {
    right: 10vw;
    top: 38vh;
    font-size: 2.25rem;
    animation-delay: 0.35s;
}

.ambient-note-j::before,
.ambient-note-k::before,
.ambient-note-m::before,
.ambient-note-p::before {
    content: "\266C";
}

.ambient-note-l::before,
.ambient-note-n::before,
.ambient-note-q::before {
    content: "\266B";
}

.piano-play-line {
    display: none;
}

.piano-key-pulse {
    position: absolute;
    top: 0.12rem;
    bottom: 0.15rem;
    z-index: 2;
    width: 1.08rem;
    border-radius: 0 0 5px 5px;
    opacity: 0.18;
    transform-origin: top center;
    animation: piano-key-pulse 4.8s ease-in-out infinite;
    box-shadow: inset 0 0.45rem 0 rgba(255, 255, 255, 0.16);
}

.piano-key-pulse-1 { left: 0.14rem; background: linear-gradient(180deg, rgba(244, 179, 33, 0.5), rgba(244, 179, 33, 0.1)); animation-delay: 0s; }
.piano-key-pulse-2 { left: 1.46rem; background: linear-gradient(180deg, rgba(64, 209, 177, 0.45), rgba(64, 209, 177, 0.09)); animation-delay: 0.28s; }
.piano-key-pulse-3 { left: 2.78rem; background: linear-gradient(180deg, rgba(113, 184, 255, 0.42), rgba(113, 184, 255, 0.08)); animation-delay: 0.56s; }
.piano-key-pulse-4 { left: 4.1rem; background: linear-gradient(180deg, rgba(255, 122, 154, 0.38), rgba(255, 122, 154, 0.07)); animation-delay: 0.84s; }
.piano-key-pulse-5 { left: 5.42rem; background: linear-gradient(180deg, rgba(255, 202, 61, 0.46), rgba(255, 202, 61, 0.09)); animation-delay: 1.12s; }
.piano-key-pulse-6 { left: 6.74rem; background: linear-gradient(180deg, rgba(57, 166, 183, 0.42), rgba(57, 166, 183, 0.08)); animation-delay: 1.4s; }
.piano-key-pulse-7 { left: 8.06rem; background: linear-gradient(180deg, rgba(64, 209, 177, 0.42), rgba(64, 209, 177, 0.08)); animation-delay: 1.68s; }
.piano-key-pulse-8 { left: 9.38rem; background: linear-gradient(180deg, rgba(244, 179, 33, 0.5), rgba(244, 179, 33, 0.1)); animation-delay: 1.96s; }

.piano-keys-ambient::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    background:
        linear-gradient(90deg,
            transparent 0 6%,
            rgba(255, 255, 255, 0.16) 7% 8%,
            transparent 10% 21%,
            rgba(255, 255, 255, 0.12) 22% 23%,
            transparent 25% 42%,
            rgba(255, 255, 255, 0.14) 43% 44%,
            transparent 46% 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 55%, rgba(0, 0, 0, 0.13));
    opacity: 0.72;
    animation: piano-color-breathe 5.8s ease-in-out infinite;
}

.piano-keys-ambient-left::after {
    animation-delay: 1.15s;
}

:root[data-theme="light"] body {
    background: linear-gradient(180deg, #f7f8fb, #e9eef4);
}

:root[data-theme="light"] .piano-keys-ambient {
    opacity: 0.17;
    border-color: color-mix(in srgb, var(--text) 14%, transparent);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.brand-symbol {
    color: var(--gold);
    font-size: 1.9rem;
    line-height: 1;
}

.brand-logo-wrap {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
    border-radius: 50%;
    background: #050608;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1rem;
}

.brand small {
    color: var(--muted);
    font-family: Georgia, 'Times New Roman', serif;
}

.main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
}

.account-nav {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    justify-self: end;
    min-width: 0;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a,
.account-nav a,
.link-button {
    color: var(--muted);
    font: inherit;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav > * + *::before {
    content: "|";
    margin-right: 0.6rem;
    color: color-mix(in srgb, var(--muted) 48%, transparent);
}

.account-nav > * + *::before {
    content: "|";
    margin-right: 0.65rem;
    color: color-mix(in srgb, var(--muted) 48%, transparent);
}

.main-nav a:hover,
.account-nav a:hover,
.link-button:hover {
    color: var(--gold);
}

.nav-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.theme-toggle {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--gold);
    cursor: pointer;
}

.messages {
    position: fixed;
    top: 5.2rem;
    right: 1rem;
    z-index: 30;
    display: grid;
    gap: 0.5rem;
    width: min(24rem, calc(100vw - 2rem));
}

.message {
    position: relative;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin: 0;
    overflow: hidden;
    padding: 0.85rem 1rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    animation: toast-in 220ms ease-out both;
}

.message::before {
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 18%, transparent);
    color: var(--text);
    font-weight: 900;
    line-height: 1;
    content: "i";
}

.message::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: color-mix(in srgb, var(--muted) 64%, transparent);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    animation: toast-progress 5600ms linear forwards;
}

.message.is-leaving {
    animation: toast-out 180ms ease-in forwards;
}

.message-success {
    border-color: color-mix(in srgb, var(--green) 54%, var(--line));
    background:
        radial-gradient(circle at 1.8rem 1.4rem, color-mix(in srgb, var(--green) 18%, transparent), transparent 5rem),
        linear-gradient(135deg, color-mix(in srgb, var(--green) 18%, var(--surface-strong)), color-mix(in srgb, var(--gold) 7%, var(--surface-strong)));
    box-shadow: 0 18px 44px color-mix(in srgb, var(--green) 14%, rgba(0, 0, 0, 0.32));
}

.message-success::before {
    background: var(--green);
    color: var(--bg);
    content: "✓";
}

.message-success::after {
    background: var(--green);
}

.message-warning,
.message-error {
    border-color: color-mix(in srgb, var(--gold) 58%, var(--line));
    background: color-mix(in srgb, var(--gold) 16%, var(--surface-strong));
}

.message-warning::before,
.message-error::before {
    background: var(--gold);
    color: var(--on-gold);
    content: "!";
}

.message-warning::after,
.message-error::after {
    background: var(--gold);
}

.app-confirm {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(6px);
    animation: fade-in 160ms ease-out both;
}

.app-confirm[hidden] {
    display: none;
}

.app-confirm-card {
    display: grid;
    gap: 0.85rem;
    width: min(28rem, 100%);
    border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    animation: popover-in 170ms ease-out both;
}

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

.app-confirm-card p {
    color: var(--muted);
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    flex-wrap: wrap;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-0.35rem);
    }
}

@keyframes toast-progress {
    to {
        transform: scaleX(1);
    }
}

.hero {
    position: relative;
    display: flex;
    align-items: end;
    min-height: 78svh;
    padding: 7rem 1rem 3rem;
    overflow: hidden;
    background-color: #000000;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.99), rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.78)),
        var(--hero-image);
    background-position: left center;
    background-size: cover;
}

:root[data-theme="light"] .hero {
    background-image:
        linear-gradient(90deg, rgba(246, 247, 249, 0.92), rgba(246, 247, 249, 0.7), rgba(246, 247, 249, 0.35)),
        var(--hero-image);
}

.hero-content {
    width: min(44rem, 100%);
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: var(--gold);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-style: italic;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2 {
    margin: 0;
    line-height: 1.04;
}

h1 {
    font-size: 3rem;
    text-transform: uppercase;
}

h2 {
    font-size: 2rem;
}

.hero-copy {
    max-width: 38rem;
    margin: 1rem 0 0;
    color: var(--text);
    font-size: 1.1rem;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    background: var(--gold);
    color: var(--on-gold);
}

.button-secondary {
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface) 76%, transparent);
    color: var(--text);
}

.button-whatsapp {
    border-color: #22c55e;
    background: #22c55e;
    color: #06120b;
}

:root[data-theme="light"] .button-whatsapp {
    border-color: #128c4a;
    background: #128c4a;
    color: #ffffff;
}

.button-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.button-ghost:hover {
    background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
    color: var(--text);
}

.button-danger-soft {
    border-color: color-mix(in srgb, #ff6767 42%, var(--line));
    background: color-mix(in srgb, #ff3434 10%, var(--surface));
    color: #ff9d9d;
}

.button-danger-soft:hover {
    background: color-mix(in srgb, #ff3434 18%, var(--surface));
    color: #ffd0d0;
}

.whatsapp-mark {
    position: relative;
    display: inline-grid;
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.24);
}

.whatsapp-mark::before,
.whatsapp-mark::after {
    content: "";
    position: absolute;
}

.whatsapp-mark::before {
    inset: 0.28rem;
    background: #ffffff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3.5A12.4 12.4 0 0 0 5.4 22.3L4 28l5.8-1.5A12.4 12.4 0 1 0 16 3.5Zm6.9 17.7c-.3.8-1.7 1.5-2.4 1.6-.6.1-1.4.1-2.2-.1-.5-.2-1.2-.4-2.1-.8-3.7-1.6-6.1-5.3-6.3-5.5-.2-.2-1.5-2-1.5-3.8s.9-2.7 1.2-3.1c.3-.4.7-.5 1-.5h.7c.2 0 .5 0 .8.6.3.7 1 2.4 1.1 2.6.1.2.1.4 0 .7-.2.3-.3.5-.5.7-.2.2-.4.5-.6.7-.2.2-.4.4-.2.8.2.3.8 1.4 1.8 2.3 1.2 1.1 2.3 1.5 2.6 1.7.3.1.6.1.8-.1.2-.3.9-1 1.1-1.3.2-.3.5-.3.8-.2.3.1 2.1 1 2.4 1.2.4.2.6.3.7.5.1.2.1 1-.2 1.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3.5A12.4 12.4 0 0 0 5.4 22.3L4 28l5.8-1.5A12.4 12.4 0 1 0 16 3.5Zm6.9 17.7c-.3.8-1.7 1.5-2.4 1.6-.6.1-1.4.1-2.2-.1-.5-.2-1.2-.4-2.1-.8-3.7-1.6-6.1-5.3-6.3-5.5-.2-.2-1.5-2-1.5-3.8s.9-2.7 1.2-3.1c.3-.4.7-.5 1-.5h.7c.2 0 .5 0 .8.6.3.7 1 2.4 1.1 2.6.1.2.1.4 0 .7-.2.3-.3.5-.5.7-.2.2-.4.5-.6.7-.2.2-.4.4-.2.8.2.3.8 1.4 1.8 2.3 1.2 1.1 2.3 1.5 2.6 1.7.3.1.6.1.8-.1.2-.3.9-1 1.1-1.3.2-.3.5-.3.8-.2.3.1 2.1 1 2.4 1.2.4.2.6.3.7.5.1.2.1 1-.2 1.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.whatsapp-mark::after {
    display: none;
}

.whatsapp-float {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 35;
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-height: 3rem;
    padding: 0.78rem 1rem;
    border: 1px solid color-mix(in srgb, #22c55e 70%, #ffffff 18%);
    border-radius: 999px;
    background: #128c4a;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    border-color: #22c55e;
    box-shadow: 0 18px 42px rgba(34, 197, 94, 0.24);
}

.is-authenticated .whatsapp-float {
    bottom: 5.5rem;
}

.section {
    padding: 2.8rem 1rem;
}

.section-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.section-heading {
    max-width: 42rem;
}

.two-columns,
.split-simple {
    display: grid;
    gap: 1.5rem;
}

.intro-band,
.quiet-band,
.scan-band {
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border-block: 1px solid var(--line);
}

.feature-list,
.portal-preview,
.scan-grid,
.student-grid,
.student-layout,
.progress-list,
.clean-list {
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.feature-item p,
.panel p,
.compact-section p {
    margin: 0;
    color: var(--muted);
}

.note-dot {
    color: var(--gold);
    font-size: 1.4rem;
}

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

.scan-card {
    position: relative;
    display: grid;
    gap: 0.45rem;
    min-height: 8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.scan-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--green) 62%, transparent), transparent 70%);
    opacity: 0.62;
}

.scan-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--gold) 36%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 84%, var(--surface));
}

.scan-icon {
    position: relative;
    display: inline-grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
    border-radius: 999px;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.scan-icon::before,
.scan-icon::after {
    content: "";
    position: absolute;
}

.scan-icon-1::before {
    left: 0.42rem;
    top: 0.72rem;
    width: 1.3rem;
    height: 0.78rem;
    border: 1.7px solid currentColor;
    border-radius: 0.12rem 0.12rem 0.26rem 0.26rem;
    box-shadow:
        inset 0.62rem 0 0 color-mix(in srgb, currentColor 10%, transparent),
        inset 0.66rem 0 0 currentColor;
}

.scan-icon-1::after {
    content: "\1D11E";
    position: absolute;
    right: 0.18rem;
    top: 0.06rem;
    color: var(--gold-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    line-height: 1;
}

.scan-icon-2::before {
    left: 0.48rem;
    top: 0.58rem;
    width: 1.22rem;
    height: 0.9rem;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}

.scan-icon-2::after {
    left: 0.66rem;
    top: 1rem;
    width: 0.14rem;
    height: 0.14rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0.34rem 0 0 currentColor, 0.68rem 0 0 currentColor;
}

.scan-icon-3::before {
    content: "\266A";
    position: static;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    line-height: 1;
}

.scan-card h2 {
    font-size: 1.35rem;
}

.scan-card p {
    margin: 0;
    color: var(--muted);
}

.accordion-list {
    display: grid;
    gap: 0.7rem;
}

.accordion-list details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.accordion-list summary {
    cursor: pointer;
    padding: 1rem;
    color: var(--text);
    font-weight: 700;
}

.accordion-list p {
    margin: 0;
    padding: 0 1rem 1rem;
    color: var(--muted);
}

.portal-preview {
    margin-top: 1.5rem;
}

.preview-panel,
.panel,
.login-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.preview-panel::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--teal) 58%, transparent), transparent 68%);
    opacity: 0.42;
    pointer-events: none;
}

.preview-panel {
    display: grid;
    gap: 0.35rem;
    min-height: 8.5rem;
    padding: 1rem;
}

.preview-panel span,
.panel-label {
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 700;
}

.label-with-icon,
.card-kicker {
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
}

.label-with-icon .nav-icon,
.card-kicker .nav-icon {
    width: 0.9rem;
    height: 0.9rem;
}

.preview-panel strong {
    font-size: 1.35rem;
}

.preview-panel small {
    color: var(--muted);
}

.mini-progress,
.progress-bar {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 8px;
    background: color-mix(in srgb, var(--muted) 20%, transparent);
}

.mini-progress span,
.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), var(--green));
}

.image-band img {
    width: 100%;
    max-height: 32rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.quick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.quick-list span {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
}

.compact-section {
    width: min(46rem, 100%);
}

.contact-band {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 88%, var(--teal)), var(--surface));
}

.login-shell {
    display: grid;
    min-height: calc(100svh - 5rem);
    place-items: center;
    padding: 3rem 1rem;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.52)),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

:root[data-theme="light"] .login-shell {
    background-image:
        linear-gradient(90deg, rgba(246, 247, 249, 0.92), rgba(246, 247, 249, 0.6)),
        var(--hero-image);
}

.login-panel {
    display: grid;
    gap: 0.7rem;
    width: min(25rem, 100%);
    padding: 1.25rem;
}

.login-panel h1 {
    font-size: 2rem;
}

.login-panel label {
    color: var(--muted);
    font-weight: 700;
}

.login-panel input {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.password-wrap {
    position: relative;
    display: grid;
}

.password-wrap input {
    padding-right: 3.1rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: inline-grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--gold);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.password-toggle-icon {
    position: relative;
    display: block;
    width: 1.05rem;
    height: 0.68rem;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.password-toggle-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 0.28rem;
    height: 0.28rem;
    margin: auto;
    border-radius: 50%;
    background: currentColor;
}

.password-toggle.is-visible .password-toggle-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -0.25rem;
    right: -0.25rem;
    border-top: 2px solid currentColor;
    transform: rotate(-35deg);
}

.form-errors {
    padding: 0.8rem;
    border: 1px solid rgba(244, 179, 33, 0.45);
    border-radius: 8px;
    color: var(--gold);
}

.student-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1rem;
    padding: 2rem 1rem;
    background:
        linear-gradient(120deg, rgba(0, 0, 0, 0.68), transparent),
        var(--surface);
    border-bottom: 1px solid var(--line);
}

.student-hero::after {
    content: "\266A";
    position: absolute;
    right: clamp(1.2rem, 7vw, 7rem);
    top: 50%;
    width: 4.2rem;
    height: 4.2rem;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
    border-radius: 50%;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.3rem;
    opacity: 0.18;
    transform: translateY(-50%) rotate(-8deg);
    pointer-events: none;
}

.student-calendar-view .student-hero::after {
    content: "";
    border-radius: 0.9rem;
    border-color: color-mix(in srgb, var(--blue) 42%, transparent);
    color: var(--blue);
    background:
        linear-gradient(currentColor, currentColor) 50% 32% / 58% 2px no-repeat,
        linear-gradient(currentColor, currentColor) 28% 18% / 2px 20% no-repeat,
        linear-gradient(currentColor, currentColor) 72% 18% / 2px 20% no-repeat;
    box-shadow: inset 0 0 0 2px currentColor;
}

.student-materials-view .student-hero::after {
    content: "";
    border-radius: 0.9rem;
    border-color: color-mix(in srgb, var(--gold) 46%, transparent);
    background:
        linear-gradient(var(--gold), var(--gold)) 28% 27% / 35% 14% no-repeat,
        linear-gradient(var(--gold), var(--gold)) 50% 56% / 68% 42% no-repeat;
}

.student-submissions-view .student-hero::after {
    content: "";
    border-color: color-mix(in srgb, var(--rose) 42%, transparent);
    border-radius: 1.2rem;
    box-shadow: inset 0 0 0 2px var(--rose);
}

.student-submissions-view .student-hero::before {
    content: "";
    position: absolute;
    right: clamp(2.4rem, 8.3vw, 8rem);
    top: calc(50% + 1.2rem);
    width: 0.9rem;
    height: 0.9rem;
    border-left: 2px solid var(--rose);
    border-bottom: 2px solid var(--rose);
    opacity: 0.18;
    transform: rotate(-35deg);
}

:root[data-theme="light"] .student-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 241, 247, 0.92)),
        var(--surface);
}

:root[data-theme="light"] .student-hero p {
    color: #384151;
}

.teacher-page {
    background:
        radial-gradient(circle at 90% 8%, rgba(64, 209, 177, 0.08), transparent 24rem),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.teacher-hero {
    padding: 2.4rem 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.68), transparent),
        var(--surface);
}

.teacher-hero-inner,
.teacher-grid,
.teacher-section {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.teacher-hero h1 {
    font-size: 2.2rem;
    text-transform: none;
}

.teacher-hero p {
    max-width: 46rem;
    margin: 0.8rem 0 0;
    color: var(--muted);
}

.teacher-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}

.teacher-card {
    --card-accent: var(--gold);
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.4rem;
    min-height: 8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.teacher-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--card-accent);
    opacity: 0.78;
}

.teacher-card.accent-students {
    --card-accent: var(--gold);
}

.teacher-card.accent-calendar {
    --card-accent: var(--teal);
}

.teacher-card.accent-billing {
    --card-accent: var(--green);
}

.teacher-card.accent-submissions {
    --card-accent: #ff8a8a;
}

.teacher-card span {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 700;
}

.teacher-card .card-kicker {
    color: color-mix(in srgb, var(--card-accent) 82%, var(--text));
}

.teacher-card strong {
    font-size: 2rem;
    line-height: 1;
}

.teacher-card small,
.teacher-card a {
    color: var(--muted);
    text-decoration: none;
}

.teacher-card a:hover,
.teacher-card.card-link:hover small {
    color: var(--text);
}

.teacher-card.card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.teacher-card.card-link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--card-accent) 44%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 86%, var(--surface));
    box-shadow: 0 18px 46px color-mix(in srgb, var(--card-accent) 12%, rgba(0, 0, 0, 0.36));
}

.teacher-card.card-link:hover .nav-icon,
.student-quick-panel.card-link:hover .nav-icon,
.scan-card:hover .scan-icon {
    animation: icon-lift 520ms ease both;
}

.teacher-section {
    display: grid;
    gap: 1rem;
    padding: 0 1rem 3rem;
}

.teacher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.student-hero > div,
.student-hero form,
.student-grid,
.student-section .section-inner {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.student-hero h1 {
    font-size: 2.1rem;
    text-transform: none;
}

.student-hero p {
    margin: 0.8rem 0 0;
    color: var(--muted);
}

.compact-hero {
    padding-block: 1.6rem;
}

.student-title-row {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.avatar {
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
}

.avatar-button {
    display: inline-flex;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: zoom-in;
}

.avatar-button:focus-visible,
.profile-photo-preview:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.avatar-fallback {
    display: inline-grid;
    place-items: center;
    color: var(--on-gold);
    background: var(--gold);
    font-weight: 800;
}

.study-toggle-form {
    position: relative;
    justify-self: start;
}

.study-toggle-button {
    position: relative;
    overflow: visible;
    gap: 0.45rem;
}

.study-toggle-form.is-studied .study-toggle-button {
    background: var(--green);
    color: #06110f;
}

:root[data-theme="light"] .study-toggle-form.is-studied .study-toggle-button {
    color: #ffffff;
}

.study-confirm {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    z-index: 8;
    display: grid;
    gap: 0.75rem;
    width: min(20rem, calc(100vw - 2rem));
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.study-confirm[hidden] {
    display: none;
}

.study-confirm p {
    margin: 0;
    color: var(--text);
}

.study-confirm div {
    display: flex;
    gap: 0.5rem;
    justify-content: end;
}

.student-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
}

.student-section {
    padding-top: 1.25rem;
}

.panel {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.panel-link {
    color: inherit;
    text-decoration: none;
}

.panel-link:hover,
.panel-link:focus-visible {
    border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
    background: color-mix(in srgb, var(--gold) 8%, var(--surface));
}

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

.panel > h2 {
    font-size: 1.55rem;
    line-height: 1.18;
}

.panel-heading {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.panel-heading h2 {
    margin-top: 0.2rem;
    font-size: 1.4rem;
}

.student-layout {
    grid-template-columns: 1fr;
}

.wide-panel {
    min-width: 0;
}

.week-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(2.4rem, 1fr));
    gap: 0.45rem;
}

.day-pill {
    display: grid;
    gap: 0.25rem;
    min-height: 4.2rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--muted);
}

.day-pill.is-studied {
    border-color: color-mix(in srgb, var(--green) 75%, var(--line));
    background: color-mix(in srgb, var(--green) 22%, var(--surface));
    color: var(--text);
}

.day-pill.is-today {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.calendar-panel {
    gap: 0.75rem;
    overflow: hidden;
}

.calendar-heading {
    align-items: start;
}

.calendar-tabs {
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
}

.calendar-tabs a {
    min-width: 4rem;
    padding: 0.38rem 0.55rem;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.calendar-tabs a:hover,
.calendar-tabs a.is-active {
    background: var(--gold);
    color: var(--on-gold);
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
}

.calendar-weekdays span {
    padding: 0.35rem 0.25rem;
    border: 1px solid var(--line);
    border-bottom: 0;
    background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    display: grid;
    align-content: start;
    gap: 0.25rem;
    min-height: 4.5rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 0;
    margin: -1px 0 0 -1px;
    background: var(--bg-soft);
}

.calendar-day.is-outside {
    opacity: 0.45;
}

.calendar-day.is-rest {
    background: color-mix(in srgb, var(--bg-soft) 68%, var(--surface));
    opacity: 0.72;
}

.calendar-day.has-study {
    border-color: color-mix(in srgb, var(--green) 70%, var(--line));
    background: color-mix(in srgb, var(--green) 18%, var(--bg-soft));
}

.calendar-day.has-lesson {
    box-shadow: inset 3px 0 0 var(--gold);
}

.calendar-day.is-today {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.calendar-day-top {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: space-between;
}

.calendar-day-top strong {
    font-size: 0.9rem;
}

.calendar-day-top span {
    color: var(--gold);
    font-size: 0.66rem;
    font-weight: 800;
}

.calendar-tags {
    display: grid;
    gap: 0.18rem;
}

.calendar-tag {
    max-width: 100%;
    overflow: hidden;
    padding: 0.14rem 0.28rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-tag.lesson {
    background: var(--gold);
    color: var(--on-gold);
}

.calendar-tag.study {
    background: var(--green);
    color: #06110f;
}

.calendar-tag.rest {
    background: color-mix(in srgb, var(--muted) 16%, transparent);
    color: var(--muted);
}

:root[data-theme="light"] .calendar-tag.study {
    color: #ffffff;
}

.clean-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.clean-list li {
    display: grid;
    gap: 0.15rem;
    padding-block: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.clean-list li:last-child {
    border-bottom: 0;
}

.clean-list span,
.progress-title span {
    color: var(--muted);
}

.progress-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.account-grid {
    display: grid;
    gap: 1rem;
}

.account-form {
    align-content: start;
}

.field-grid {
    display: grid;
    gap: 0.8rem;
}

.field-stack {
    display: grid;
    gap: 0.35rem;
}

.account-form label {
    color: var(--muted);
    font-weight: 700;
}

.account-form input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.account-form input[type="file"] {
    padding: 0.55rem;
}

.account-form input[type="file"]::file-selector-button {
    margin-right: 0.7rem;
    padding: 0.48rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-form input[type="file"]::file-selector-button:hover {
    border-color: color-mix(in srgb, var(--gold) 60%, var(--line));
    color: var(--gold);
}

.profile-photo-editor {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    text-align: center;
}

.profile-photo-preview {
    display: inline-grid;
    width: 7.5rem;
    height: 7.5rem;
    place-items: center;
    overflow: hidden;
    border: 1px dashed color-mix(in srgb, var(--gold) 60%, var(--line));
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 4.8rem),
        var(--bg-soft);
    color: var(--muted);
    cursor: pointer;
}

.profile-photo-preview.is-dragging {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--gold) 14%, var(--surface));
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-empty {
    display: grid;
    gap: 0.05rem;
    padding: 0.8rem;
    text-align: center;
}

.profile-photo-empty strong {
    color: var(--gold);
    font-size: 2.4rem;
    line-height: 1;
}

.profile-photo-empty span {
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
}

.profile-photo-empty small,
.field-help {
    color: var(--muted);
    font-size: 0.86rem;
}

.profile-photo-input {
    display: none;
}

.input-with-icon {
    position: relative;
}

.input-with-icon > span {
    position: absolute;
    top: 50%;
    left: 0.8rem;
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #1fa855;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.input-with-icon input {
    padding-left: 2.75rem;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.76);
}

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

.photo-lightbox-frame {
    position: relative;
    width: min(28rem, 92vw);
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.photo-lightbox-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-lightbox-back {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 1;
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.35rem;
}

.account-form ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (min-width: 760px) {
    .site-header {
        grid-template-columns: auto 1fr auto auto;
        padding-inline: 1.5rem;
    }

    .main-nav {
        grid-column: auto;
        grid-row: 1;
        justify-content: center;
        padding-bottom: 0;
    }

    .theme-toggle {
        grid-column: auto;
        grid-row: 1;
    }

    .account-nav {
        grid-column: auto;
        grid-row: 1;
    }

    .hero {
        min-height: 80svh;
        padding-inline: 2rem;
    }

    .hero-content {
        margin-left: max(2rem, calc((100vw - 1120px) / 2));
    }

    h1 {
        font-size: 4.4rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .section {
        padding: 4.5rem 2rem;
    }

    .two-columns,
    .split-simple {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        align-items: center;
    }

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

    .portal-preview,
    .student-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }


    .student-hero {
        grid-template-columns: 1fr auto;
        align-items: end;
        padding-inline: 2rem;
    }

    .student-hero > div,
    .student-hero form {
        width: auto;
        margin-inline: 0;
    }

    .study-toggle-form {
        justify-self: end;
    }

    .student-grid {
        padding: 1.5rem 2rem;
    }

    .student-section {
        padding-top: 1.5rem;
    }

    .teacher-hero {
        padding-inline: 2rem;
    }

    .teacher-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 1.5rem 2rem;
    }

    .teacher-section {
        padding-inline: 2rem;
    }

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

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

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

    .wide-panel {
        grid-column: 1 / -1;
    }
}

.student-hero .eyebrow,
.teacher-hero .eyebrow {
    margin-bottom: 0.75rem;
}

.student-title-row {
    margin-top: 0;
}

.student-title-row + p {
    margin-top: 0.75rem;
}

.student-grid {
    align-items: stretch;
}

.student-grid > .panel {
    min-height: 10rem;
}

.single-account-grid {
    max-width: 48rem;
}

.account-form input,
.account-form select,
.account-form textarea,
.search-form input,
.search-form select,
.weekly-plan-form textarea,
.weekly-plan-form select,
.material-picker input,
.material-picker button,
.topic-card input,
.topic-card select,
.topic-card textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.account-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.weekly-plan-form textarea,
.topic-card textarea {
    min-height: 5rem;
    resize: vertical;
}

.account-form input[type="checkbox"] {
    width: 1.1rem;
    min-height: 1.1rem;
    accent-color: var(--gold);
}

.account-form input[type="file"] {
    padding: 0.55rem;
}

.profile-photo-empty {
    gap: 0;
}

.profile-photo-empty strong {
    font-size: 2.25rem;
}

.profile-photo-empty span {
    font-size: 0.78rem;
}

.teacher-hero-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

.two-panel-section {
    grid-template-columns: 1fr;
    align-items: start;
}

.narrow-section {
    width: min(720px, 100%);
}

.teacher-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    justify-content: space-between;
}

.compact-toolbar {
    align-items: center;
}

.search-form {
    display: flex;
    flex: 1 1 24rem;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: end;
}

.search-form label {
    flex: 0 0 100%;
    color: var(--muted);
    font-weight: 700;
}

.search-form input {
    flex: 1 1 16rem;
}

.teacher-list {
    display: grid;
    gap: 0.75rem;
}

.teacher-list-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.teacher-list-avatar {
    display: inline-grid;
    place-items: center;
    color: inherit;
    text-decoration: none;
}

.avatar-small {
    width: 2.85rem;
    height: 2.85rem;
    border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.teacher-list-card:has(.teacher-list-main:hover),
.teacher-list-card:has(.teacher-list-main:focus-visible) {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 84%, var(--surface));
}

.stacked-card {
    align-items: start;
}

.teacher-list-main {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    padding-block: 0.2rem;
    text-decoration: none;
}

.teacher-list-main strong {
    color: var(--text);
}

.teacher-list-main span,
.teacher-list-main small {
    color: var(--muted);
}

.teacher-list-main:hover strong {
    color: var(--gold);
}

.icon-button {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
}

.icon-button:hover {
    border-color: color-mix(in srgb, var(--gold) 60%, var(--line));
    color: var(--gold);
}

.danger-button:hover,
.danger-link:hover {
    border-color: rgba(255, 101, 101, 0.65);
    color: #ff8a8a;
}

.simple-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.simple-stats div {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
}

.simple-stats strong {
    font-size: 1.5rem;
}

.simple-stats span {
    color: var(--muted);
    font-size: 0.86rem;
}

.streak-admin-list {
    display: grid;
    gap: 0.85rem;
}

.streak-admin-card,
.streak-summary-card {
    gap: 0.85rem;
}

.streak-admin-card.is-goal-met,
.streak-summary-card.is-goal-met {
    border-color: color-mix(in srgb, var(--green) 42%, var(--line));
    background:
        radial-gradient(circle at 3rem 2rem, color-mix(in srgb, var(--green) 12%, transparent), transparent 7rem),
        var(--surface);
}

.streak-admin-card.is-disabled,
.streak-summary-card.is-disabled {
    opacity: 0.78;
}

.streak-admin-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
}

.streak-admin-main h2 {
    margin: 0.1rem 0;
}

.teacher-own-streak {
    margin-bottom: 1rem;
    border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
    background:
        radial-gradient(circle at 2rem 2rem, color-mix(in srgb, var(--gold) 12%, transparent), transparent 7rem),
        color-mix(in srgb, var(--surface-strong) 86%, var(--surface));
}

.teacher-own-streak.streak-panel {
    gap: 1rem;
}

.streak-panel.is-disabled {
    opacity: 0.78;
}

.teacher-streak-heading {
    align-items: flex-start;
    gap: 1rem;
}

.teacher-streak-heading > form {
    margin: 0;
    justify-self: end;
}

.teacher-own-streak .streak-admin-main {
    align-items: flex-start;
}

.teacher-streak-settings {
    margin-top: 0.1rem;
}

.teacher-streak-settings-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.65rem;
}

.teacher-streak-settings .compact-streak-form {
    align-items: end;
}

.streak-admin-progress {
    display: grid;
    gap: 0.45rem;
}

.streak-teacher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: end;
    justify-content: space-between;
}

.streak-teacher-actions form {
    margin: 0;
}

.compact-streak-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: end;
}

.compact-streak-form label:not(.check-row) {
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.compact-streak-form select {
    min-height: 2.35rem;
    padding: 0 0.65rem;
}

.button[disabled] {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
}

.inline-details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
}

.inline-details + .inline-details {
    margin-top: 0.65rem;
}

.inline-details summary {
    cursor: pointer;
    padding: 0.75rem 0.85rem;
    color: var(--text);
    font-weight: 800;
}

.mini-form {
    display: grid;
    gap: 0.7rem;
    padding: 0.85rem;
}

.compact-list li {
    position: relative;
}

.action-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.action-list li > span,
.action-list li > strong {
    grid-column: 1;
}

.action-list li > form,
.action-list li > .row-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.row-actions {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.calendar-shell {
    width: min(34rem, 100%);
    margin-inline: auto;
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.calendar-toolbar strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-transform: lowercase;
}

.calendar-toolbar a {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 1.6rem;
    line-height: 1;
}

.calendar-toolbar a:hover {
    background: var(--surface-strong);
    color: var(--gold);
}

.calendar-weekdays,
.calendar-grid {
    width: min(34rem, 100%);
    margin-inline: auto;
}

.calendar-weekdays {
    margin-bottom: 0.15rem;
}

.calendar-weekdays span {
    border: 0;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: none;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 0;
    padding: 0.38rem;
    border-color: transparent;
    background: transparent;
}

.calendar-day:hover {
    background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
}

.calendar-day.is-outside {
    opacity: 0.34;
}

.calendar-day.is-rest {
    background: transparent;
    opacity: 0.55;
}

.calendar-day.has-study {
    border-color: transparent;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--green);
}

.calendar-day.is-today {
    outline: 2px solid #00a8ff;
    outline-offset: -3px;
}

.calendar-day.has-lesson {
    box-shadow: inset 0 -3px 0 var(--gold);
}

.calendar-day.has-event {
    box-shadow: inset 0 -3px 0 var(--teal);
}

.calendar-day.has-fee {
    box-shadow: inset 0 -3px 0 var(--green);
}

.calendar-day.has-lesson.has-event,
.calendar-day.has-lesson.has-fee,
.calendar-day.has-event.has-fee {
    box-shadow:
        inset 0 -3px 0 var(--gold),
        inset 0 -6px 0 var(--teal);
}

.calendar-day-top {
    justify-content: center;
}

.calendar-day-top strong {
    font-size: 1rem;
    font-weight: 500;
}

.calendar-day-top span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.calendar-tags {
    margin-top: auto;
}

.calendar-tag {
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.56rem;
    font-weight: 700;
    text-align: center;
}

.calendar-tag.lesson,
.calendar-tag.event,
.calendar-tag.fee,
.calendar-tag.study,
.calendar-tag.rest {
    background: transparent;
}

.calendar-tag.lesson {
    color: var(--gold);
}

.calendar-tag.event {
    color: var(--teal);
}

.calendar-tag.fee,
.calendar-tag.study {
    color: var(--green);
}

.calendar-tabs {
    align-self: start;
}

:root[data-theme="light"] .calendar-day.is-today {
    outline-color: #0078d4;
}

:root[data-theme="light"] .calendar-day:hover {
    background: #eef3f8;
}

@media (min-width: 760px) {
    .two-panel-section {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.82fr);
    }

    .narrow-section {
        padding-inline: 2rem;
    }

    .single-account-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-tabbar {
    display: none;
}

@media (max-width: 759px) {
    .is-authenticated {
        padding-bottom: calc(4.7rem + env(safe-area-inset-bottom));
    }

    .is-authenticated .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem;
        padding: 0.55rem 0.85rem;
    }

    .is-authenticated .main-nav,
    .is-authenticated .account-nav {
        display: none;
    }

    .is-authenticated .theme-toggle {
        grid-column: 2;
        grid-row: 1;
        width: 2.35rem;
        height: 2.35rem;
    }

    .is-authenticated .brand {
        max-width: 100%;
    }

    .is-authenticated .brand-symbol {
        font-size: 1.65rem;
    }

    .is-authenticated .brand strong {
        font-size: 0.92rem;
    }

    .is-authenticated .brand small {
        font-size: 0.78rem;
    }

    .mobile-tabbar {
        position: fixed;
        right: max(0.65rem, env(safe-area-inset-right));
        bottom: max(0.55rem, env(safe-area-inset-bottom));
        left: max(0.65rem, env(safe-area-inset-left));
        z-index: 35;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.2rem;
        padding: 0.42rem;
        border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
        border-radius: 18px;
        background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
        backdrop-filter: blur(18px);
    }

    .is-staff .mobile-tabbar {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .mobile-tabbar-form {
        display: contents;
        margin: 0;
    }

    .mobile-tabbar-item {
        display: grid;
        min-width: 0;
        min-height: 3rem;
        place-items: center;
        gap: 0;
        padding: 0.32rem 0.1rem;
        border: 1px solid transparent;
        border-radius: 14px;
        background: transparent;
        color: var(--muted);
        font: inherit;
        font-size: 0.6rem;
        font-weight: 800;
        line-height: 1.05;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tabbar-item .nav-icon {
        width: 1.28rem;
        height: 1.28rem;
    }

    .mobile-tabbar-item > span:not(.nav-icon) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .mobile-tabbar-item.is-active {
        border-color: color-mix(in srgb, var(--gold) 34%, transparent);
        background: color-mix(in srgb, var(--gold) 14%, var(--surface));
        color: var(--gold-strong);
    }

    .mobile-tabbar-item:active,
    .mobile-tabbar-item:hover {
        color: var(--gold);
        background: color-mix(in srgb, var(--surface) 80%, transparent);
    }

    .student-calendar-card {
        scroll-margin-top: 5.2rem;
    }

    .student-hero,
    .teacher-hero {
        padding: 1.15rem 0.85rem;
    }

    .student-hero::after {
        right: 0.7rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.6rem;
        opacity: 0.11;
    }

    .student-hero h1,
    .teacher-hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.15rem);
    }

    .student-hero p,
    .teacher-hero p {
        margin-top: 0.55rem;
    }

    .student-page .student-title-row {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .study-toggle-form {
        justify-self: center;
        width: min(16rem, 100%);
    }

    .study-toggle-button {
        width: 100%;
    }

    .student-grid,
    .teacher-grid,
    .teacher-section,
    .student-section {
        padding-inline: 0.85rem;
    }

    .student-grid {
        gap: 0.75rem;
        padding-block: 0.9rem;
    }

    .student-grid > .panel,
    .student-secondary-grid > .panel {
        min-height: auto;
    }

    .student-section {
        padding-top: 0.35rem;
    }

    .panel {
        padding: 0.9rem;
    }

    .panel strong {
        font-size: 1.08rem;
    }

    .panel-heading h2 {
        font-size: 1.18rem;
    }

    .week-row {
        gap: 0.35rem;
    }

    .day-pill {
        min-height: 4rem;
        padding: 0.45rem 0.2rem;
    }

    .calendar-day {
        min-height: auto;
        aspect-ratio: 1;
        padding: 0.24rem 0.12rem;
        overflow: hidden;
    }

    .calendar-weekdays,
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        width: 100%;
    }

    .calendar-weekdays span {
        padding-inline: 0;
        font-size: 0.68rem;
    }

    .calendar-day-top strong {
        font-size: 0.84rem;
    }

    .calendar-tags {
        display: flex;
        gap: 0.12rem;
        justify-content: center;
        min-width: 0;
    }

    .teacher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        padding-block: 0.9rem;
    }

    .teacher-card {
        min-height: 6.6rem;
        padding: 0.85rem;
    }

    .teacher-card strong {
        font-size: 1.55rem;
    }

    .teacher-card span,
    .teacher-card a {
        font-size: 0.82rem;
    }

    .teacher-section {
        gap: 0.85rem;
        padding-bottom: 1.6rem;
    }

    .teacher-toolbar,
    .search-form {
        gap: 0.65rem;
    }

    .teacher-page .search-form input,
    .teacher-page .search-form .button,
    .teacher-page .teacher-toolbar > .button {
        flex: 1 1 100%;
        width: 100%;
    }

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

    .calendar-tag {
        font-size: 0;
    }

    .calendar-tag::before {
        content: "";
        display: block;
        width: 0.32rem;
        height: 0.32rem;
        margin-inline: auto;
        border-radius: 50%;
        background: currentColor;
    }
}

.icon-link {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.nav-icon {
    position: relative;
    display: inline-block;
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    color: currentColor;
}

.user-icon::before,
.user-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 1.7px solid currentColor;
}

.user-icon::before {
    top: 0.08rem;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
}

.user-icon::after {
    bottom: 0.06rem;
    width: 0.7rem;
    height: 0.42rem;
    border-radius: 999px 999px 0 0;
    border-bottom: 0;
}

.power-icon {
    border: 1.7px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
}

.power-icon::before {
    content: "";
    position: absolute;
    top: -0.08rem;
    left: 50%;
    width: 1.7px;
    height: 0.54rem;
    transform: translateX(-50%);
    border-radius: 99px;
    background: currentColor;
}

.home-icon::before,
.home-icon::after,
.calendar-line-icon::before,
.calendar-line-icon::after,
.students-icon::before,
.students-icon::after,
.folder-icon::before,
.folder-icon::after,
.message-icon::before,
.message-icon::after,
.coin-icon::before,
.coin-icon::after,
.note-line-icon::before,
.note-line-icon::after {
    content: "";
    position: absolute;
}

.home-icon::before {
    top: 0.11rem;
    left: 0.21rem;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 1.7px solid currentColor;
    border-left: 1.7px solid currentColor;
    transform: rotate(45deg);
}

.home-icon::after {
    left: 0.21rem;
    bottom: 0.09rem;
    width: 0.52rem;
    height: 0.42rem;
    border: 1.7px solid currentColor;
    border-top: 0;
    border-radius: 0 0 3px 3px;
}

.calendar-line-icon {
    border: 1.7px solid currentColor;
    border-radius: 3px;
}

.calendar-line-icon::before {
    top: 0.23rem;
    left: 0;
    right: 0;
    height: 1.7px;
    background: currentColor;
}

.calendar-line-icon::after {
    top: -0.09rem;
    left: 0.2rem;
    width: 0.12rem;
    height: 0.25rem;
    border-radius: 99px;
    background: currentColor;
    box-shadow: 0.38rem 0 0 currentColor;
}

.students-icon::before {
    top: 0.12rem;
    left: 0.13rem;
    width: 0.28rem;
    height: 0.28rem;
    border: 1.7px solid currentColor;
    border-radius: 50%;
    box-shadow: 0.39rem 0.04rem 0 -0.04rem currentColor;
}

.students-icon::after {
    left: 0.08rem;
    bottom: 0.1rem;
    width: 0.76rem;
    height: 0.38rem;
    border: 1.7px solid currentColor;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

.folder-icon::before {
    left: 0.08rem;
    top: 0.24rem;
    width: 0.8rem;
    height: 0.52rem;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}

.folder-icon::after {
    left: 0.12rem;
    top: 0.14rem;
    width: 0.32rem;
    height: 0.18rem;
    border: 1.7px solid currentColor;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
}

.message-icon::before {
    inset: 0.12rem 0.08rem 0.22rem;
    border: 1.7px solid currentColor;
    border-radius: 4px;
}

.message-icon::after {
    left: 0.26rem;
    bottom: 0.1rem;
    width: 0.26rem;
    height: 0.26rem;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(-35deg);
    background: var(--surface);
}

.coin-icon::before {
    inset: 0.08rem;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.coin-icon::after {
    left: 0.39rem;
    top: 0.24rem;
    width: 0.18rem;
    height: 0.47rem;
    border-radius: 99px;
    background: currentColor;
    box-shadow: -0.12rem 0.18rem 0 -0.06rem currentColor, 0.12rem -0.18rem 0 -0.06rem currentColor;
}

.note-line-icon::before {
    right: 0.19rem;
    top: 0.06rem;
    width: 0.15rem;
    height: 0.64rem;
    border-radius: 99px;
    background: currentColor;
    transform: rotate(-2deg);
}

.note-line-icon::after {
    left: 0.12rem;
    bottom: 0.08rem;
    width: 0.48rem;
    height: 0.34rem;
    border-radius: 50%;
    background: currentColor;
    transform: rotate(-18deg);
    box-shadow: 0.44rem -0.55rem 0 -0.17rem currentColor;
}

.streak-icon::before {
    content: "\266A";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 1.7px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.home-icon {
    color: var(--gold);
}

.calendar-line-icon {
    color: var(--blue);
}

.folder-icon {
    color: var(--gold-strong);
    transform: translateY(-0.04rem);
}

.message-icon {
    color: var(--rose);
}

.user-icon,
.students-icon {
    color: var(--teal);
}

.note-line-icon,
.coin-icon {
    color: var(--gold);
}

.streak-icon {
    color: var(--green);
}

.doc-icon,
.history-icon {
    position: relative;
}

.doc-icon {
    color: var(--gold-strong);
}

.history-icon {
    color: var(--green);
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.doc-icon::before,
.doc-icon::after,
.history-icon::before,
.history-icon::after {
    content: "";
    position: absolute;
}

.doc-icon::before {
    inset: 0.08rem 0.16rem;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}

.doc-icon::after {
    right: 0.17rem;
    top: 0.09rem;
    width: 0.26rem;
    height: 0.26rem;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(-90deg);
}

.history-icon::before {
    left: 0.43rem;
    top: 0.18rem;
    width: 1.7px;
    height: 0.32rem;
    border-radius: 99px;
    background: currentColor;
}

.history-icon::after {
    left: 0.43rem;
    top: 0.45rem;
    width: 0.3rem;
    height: 1.7px;
    border-radius: 99px;
    background: currentColor;
    transform: rotate(22deg);
    transform-origin: left center;
}

.back-button {
    display: block;
    width: fit-content;
    margin: 0.75rem auto 0;
    padding: 0.28rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
}

.back-button:hover {
    color: var(--gold);
    border-color: color-mix(in srgb, var(--gold) 50%, var(--line));
}

.student-page .student-hero > div {
    justify-self: center;
    text-align: center;
}

.student-page .student-title-row {
    justify-content: center;
}

.student-grid {
    padding-bottom: 1.5rem;
}

.student-section {
    padding: 0 1rem 3rem;
}

.student-layout {
    align-items: start;
}

.student-calendar-card {
    grid-column: 1 / -1;
    width: min(40rem, 100%);
    justify-self: center;
}

.student-calendar-card .panel-heading {
    justify-content: center;
    text-align: center;
}

.student-calendar-card .calendar-shell,
.student-calendar-card .calendar-weekdays,
.student-calendar-card .calendar-grid {
    width: min(32rem, 100%);
}

.teacher-hero.compact-hero + .teacher-section,
.teacher-hero.compact-hero + .narrow-section {
    margin-top: 1.5rem;
}

.teacher-page .button,
.student-page .button {
    min-width: 7.25rem;
}

.button-small {
    min-width: 5.8rem !important;
    min-height: 2.35rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
}

.teacher-toolbar .button,
.search-form .button {
    flex: 0 0 auto;
    min-width: 7rem;
}

.search-form {
    gap: 0.7rem;
}

.icon-button {
    text-decoration: none;
}

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

.checkbox-row label {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 2.75rem;
}

.profile-photo-preview {
    position: relative;
    border-style: solid;
    border-color: color-mix(in srgb, var(--muted) 34%, var(--line));
    background: var(--surface-strong);
    box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--bg-soft) 62%, transparent);
}

.profile-photo-preview[data-photo-has-image="false"]::after {
    content: "+";
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    display: grid;
    width: 1.45rem;
    height: 1.45rem;
    place-items: center;
    border: 2px solid var(--surface-strong);
    border-radius: 50%;
    background: var(--gold);
    color: var(--on-gold);
    font-weight: 900;
    line-height: 1;
}

.profile-photo-empty {
    place-items: center;
    color: var(--muted);
}

.profile-photo-empty span:last-child {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.photo-camera {
    position: relative;
    display: inline-block;
    width: 2.25rem;
    height: 1.62rem;
    border: 2px solid var(--gold);
    border-radius: 0.42rem;
}

.photo-camera::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 0.68rem;
    height: 0.68rem;
    margin: auto;
    border: 2px solid var(--gold);
    border-radius: 50%;
}

.photo-camera::after {
    content: "";
    position: absolute;
    top: -0.36rem;
    left: 0.42rem;
    width: 0.72rem;
    height: 0.28rem;
    border-radius: 0.22rem 0.22rem 0 0;
    background: var(--gold);
}

.calendar-day.is-rest {
    background: color-mix(in srgb, var(--surface-strong) 56%, var(--bg) 44%);
    opacity: 1;
}

.calendar-day.is-rest .calendar-day-top strong {
    color: var(--muted);
}

.calendar-day.is-holiday {
    background: color-mix(in srgb, var(--gold) 10%, var(--surface));
}

.calendar-tag.rest {
    color: color-mix(in srgb, var(--muted) 82%, var(--text));
}

.week-toolbar {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    width: min(42rem, 100%);
    margin: 0 auto 0.75rem;
}

.week-toolbar strong {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.week-toolbar a {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 1.6rem;
}

.week-toolbar a:hover {
    background: var(--surface-strong);
    color: var(--gold);
}

.teacher-week {
    display: grid;
    gap: 0.55rem;
}

.teacher-week-day {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
}

.teacher-week-day header {
    display: grid;
    gap: 0.1rem;
    justify-items: center;
}

.teacher-week-day header span,
.teacher-week-day small {
    color: var(--muted);
}

.teacher-week-day.is-today {
    outline: 2px solid #00a8ff;
    outline-offset: -2px;
}

.teacher-week-day.is-rest {
    background: color-mix(in srgb, var(--surface-strong) 62%, var(--bg) 38%);
}

.teacher-week-day.is-holiday {
    background: color-mix(in srgb, var(--gold) 10%, var(--surface));
}

.week-item {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.week-item strong {
    font-size: 0.88rem;
    line-height: 1.25;
}

.week-item span {
    color: var(--muted);
    font-size: 0.88rem;
}

.week-item.event {
    border-left-color: var(--teal);
}

.week-item.fee {
    border-left-color: var(--green);
}

@media (min-width: 760px) {
    .student-section {
        padding: 0 2rem 3rem;
    }

    .teacher-week {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .teacher-week-day {
        min-height: 10rem;
        align-content: start;
    }
}

.main-nav a,
.account-nav a,
.link-button {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.2rem 0.45rem;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.main-nav a.is-active,
.account-nav a.is-active {
    color: var(--text);
    border-color: color-mix(in srgb, var(--line) 72%, transparent);
    background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
}

.main-nav a:hover,
.account-nav a:hover,
.link-button:hover {
    background: color-mix(in srgb, var(--surface-strong) 62%, transparent);
}

.back-button {
    margin: 0.7rem 0 0 max(1rem, calc((100vw - 1120px) / 2));
    background: transparent;
    box-shadow: none;
}

.teacher-hero-inner,
.teacher-grid,
.teacher-section,
.student-hero > div,
.student-hero form,
.student-grid,
.student-section .section-inner {
    width: min(1120px, calc(100% - 2rem));
}

.teacher-grid,
.teacher-section,
.student-grid {
    padding-inline: 0;
}

.teacher-section,
.student-layout,
.student-grid,
.teacher-grid,
.teacher-list {
    gap: 1.25rem;
}

.teacher-card,
.teacher-list-card,
.panel,
.preview-panel {
    min-width: 0;
}

.teacher-grid {
    align-items: stretch;
}

.teacher-grid > .teacher-card,
.student-grid > .panel,
.calendar-overview-grid > .panel {
    height: 100%;
}

.student-grid > .panel {
    display: grid;
    align-content: start;
    min-height: 10.5rem;
}

.panel-heading.compact-heading h2 {
    font-size: 1.35rem;
}

.teacher-toolbar {
    align-items: end;
}

.search-form {
    align-items: end;
}

.teacher-page .search-form input,
.teacher-page .search-form .button,
.teacher-page .teacher-toolbar > .button {
    height: 3rem;
    min-height: 3rem;
    padding-block: 0.7rem;
}

.teacher-page .search-form input {
    flex-basis: 18rem;
}

.teacher-page .teacher-toolbar > .button {
    flex: 0 0 auto;
}

.calendar-overview-grid {
    align-items: stretch;
}

.google-calendar-panel {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.google-calendar-panel p {
    margin: 0;
    color: var(--muted);
}

.google-calendar-panel .button {
    width: fit-content;
}

.preference-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.preference-pills button {
    min-height: 2.35rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.preference-pills button:hover,
.preference-pills button.is-active {
    border-color: color-mix(in srgb, var(--gold) 54%, var(--line));
    background: color-mix(in srgb, var(--gold) 14%, var(--surface));
    color: var(--text);
}

.inline-alert {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.inline-alert::before {
    display: inline-grid;
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 1.2rem;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: var(--on-gold);
    font-size: 0.8rem;
    font-weight: 900;
    content: "!";
}

.warning-alert {
    color: var(--text);
    border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
}

.sync-button {
    position: relative;
}

.sync-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
}

[data-sync-form].is-syncing .sync-icon {
    animation: sync-spin 760ms linear infinite;
}

[data-sync-form].is-syncing button {
    opacity: 0.78;
    pointer-events: none;
}

@keyframes sync-spin {
    to {
        transform: rotate(360deg);
    }
}

.google-calendar-embed-panel {
    overflow: hidden;
}

.google-calendar-embed {
    width: 100%;
    min-height: 36rem;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
}

.action-panel {
    align-content: start;
}

.action-details {
    border: 0;
    background: transparent;
}

.action-details summary {
    display: inline-flex;
    width: fit-content;
    min-height: 2.55rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    color: var(--text);
    font-weight: 800;
    list-style: none;
}

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

.action-details summary:hover {
    border-color: color-mix(in srgb, var(--gold) 48%, var(--line));
    color: var(--gold);
}

.action-details[open] {
    border: 1px solid var(--line);
    background: var(--bg-soft);
}

.action-details[open] summary {
    margin: 0.65rem 0.65rem 0;
}

.profile-photo-preview {
    width: 9rem;
    height: 9rem;
    border-color: color-mix(in srgb, var(--muted) 42%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 92%, var(--bg));
    box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--bg-soft) 70%, transparent);
}

.profile-photo-preview[data-photo-has-image="false"]::after {
    right: 0.72rem;
    bottom: 0.72rem;
    width: 1.72rem;
    height: 1.72rem;
}

.profile-photo-empty {
    gap: 0.45rem;
    padding: 0.9rem;
    place-items: center;
}

.profile-photo-empty span:last-child {
    max-width: 5.2rem;
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.16;
}

.photo-camera {
    display: block;
    width: 2.45rem;
    height: 1.78rem;
    margin-inline: auto;
}

.profile-photo-menu {
    display: inline-flex;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

.photo-action {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
}

.photo-action:hover {
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    color: var(--gold);
}

.danger-action:hover {
    color: #ff8a8a;
}

.calendar-day.has-lesson {
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    box-shadow: inset 0 -3px 0 var(--gold);
}

.calendar-day.has-fee:not(.has-lesson) {
    box-shadow: inset 0 -3px 0 var(--green);
}

.student-page .calendar-day.has-study {
    background: color-mix(in srgb, var(--green) 16%, transparent);
    box-shadow: inset 0 -3px 0 var(--green);
}

.student-page .calendar-day.has-lesson:not(.has-study) {
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    box-shadow: inset 0 -3px 0 var(--gold);
}

.calendar-day.is-rest:not(.has-lesson):not(.has-study) {
    background: color-mix(in srgb, var(--surface-strong) 58%, var(--bg) 42%);
}

.calendar-day.is-holiday:not(.has-lesson):not(.has-study) {
    background: color-mix(in srgb, var(--gold) 10%, var(--surface));
}

@media (min-width: 760px) {
    .teacher-grid,
    .teacher-section,
    .student-grid,
    .student-section {
        padding-inline: 0;
    }

    .calendar-overview-grid {
        grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.36fr);
    }
}

html {
    scrollbar-color: color-mix(in srgb, var(--muted) 48%, var(--surface)) var(--bg);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 0.7rem;
    height: 0.7rem;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 48%, var(--surface));
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.public-page .hero {
    min-height: 66svh;
    align-items: center;
    padding-block: 4.8rem 2.6rem;
}

@media (min-width: 760px) {
    .public-page .hero {
        min-height: 64svh;
        padding-block: 5.25rem 2.75rem;
    }
}

.teacher-mini-profile {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.avatar-small {
    width: 2rem;
    height: 2rem;
}

.student-status-panel,
.billing-snapshot {
    align-content: start;
}

.billing-snapshot {
    display: grid;
    gap: 0.1rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
}

.billing-snapshot span,
.late-note,
.reported-note {
    color: var(--muted);
}

.status-late,
.status-late-row {
    border-color: rgba(255, 101, 101, 0.48) !important;
    background: color-mix(in srgb, #ff3f3f 9%, var(--surface)) !important;
}

.status-late-text strong,
.status-late strong,
.status-late-row strong,
.late-note {
    color: #ff8a8a;
}

.status-reported {
    border-color: color-mix(in srgb, var(--gold) 48%, var(--line)) !important;
    background: color-mix(in srgb, var(--gold) 10%, var(--surface)) !important;
}

.status-reported strong,
.reported-note {
    color: var(--gold);
}

.fee-report-form {
    margin-top: 0.65rem;
}

.money-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
}

.money-field > span {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    padding-inline: 0.75rem 0.55rem;
    color: var(--muted);
    font-weight: 800;
}

.account-form .money-field input {
    min-height: 2.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding-left: 0;
}

.billing-settings input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.billing-settings input[type="number"]::-webkit-outer-spin-button,
.billing-settings input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.calendar-shell,
.teacher-week-shell {
    transition: opacity 140ms ease;
}

.calendar-shell.is-loading,
.teacher-week-shell.is-loading {
    opacity: 0.45;
}

.student-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.student-detail-actions form {
    margin: 0;
}

.profile-summary-card {
    display: grid;
    align-content: start;
}

.profile-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.profile-summary h2,
.profile-summary p {
    margin: 0;
}

.profile-summary h2 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

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

.avatar-large {
    width: 5.25rem;
    height: 5.25rem;
    flex: 0 0 5.25rem;
}

.muted-note {
    margin-top: 1rem;
    color: var(--muted);
}

.bell-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}

.study-note-icon {
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, #ffffff 18%, transparent);
    color: inherit;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 1;
}

.bell-icon {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

.bell-icon::before,
.bell-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: currentColor;
}

.bell-icon::before {
    bottom: -0.22rem;
    width: 1.1rem;
    height: 0.14rem;
    border-radius: 999px;
}

.bell-icon::after {
    bottom: -0.46rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
}

.reminder-button.is-off {
    color: var(--muted);
    opacity: 0.82;
}

.reminder-button.is-off .bell-icon::before {
    width: 1.2rem;
}

.reminder-button.is-off .bell-icon::after {
    content: "";
    top: 50%;
    bottom: auto;
    width: 1.36rem;
    height: 0.14rem;
    border-radius: 999px;
    transform: translate(-50%, -50%) rotate(-35deg);
}

.reminder-button.is-on {
    border-color: color-mix(in srgb, var(--green) 42%, var(--line));
    color: color-mix(in srgb, var(--green) 72%, var(--text));
}

.study-toggle-form.is-celebrating .study-toggle-button {
    animation: study-pop 340ms ease both;
}

@keyframes study-pop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(244, 179, 33, 0);
    }
    45% {
        transform: scale(1.06);
        box-shadow: 0 0 0 0.65rem rgba(244, 179, 33, 0.16);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 1rem rgba(244, 179, 33, 0);
    }
}

.streak-panel {
    position: relative;
    overflow: hidden;
    gap: 0.85rem;
}

.streak-panel.is-goal-met {
    border-color: color-mix(in srgb, var(--green) 42%, var(--line));
    background:
        radial-gradient(circle at 7% 12%, color-mix(in srgb, var(--green) 13%, transparent), transparent 9rem),
        color-mix(in srgb, var(--surface-strong) 86%, var(--surface));
}

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

.streak-actions form {
    margin: 0;
}

.streak-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
    border-radius: 8px;
    background:
        radial-gradient(circle at 2rem 2rem, rgba(244, 179, 33, 0.18), transparent 4rem),
        color-mix(in srgb, var(--surface-strong) 76%, transparent);
}

.streak-hero.is-goal-met {
    border-color: color-mix(in srgb, var(--green) 58%, var(--gold));
    background:
        radial-gradient(circle at 2rem 2rem, color-mix(in srgb, var(--green) 22%, transparent), transparent 5.5rem),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 6rem),
        color-mix(in srgb, var(--green) 12%, var(--surface-strong));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent), 0 18px 52px rgba(0, 0, 0, 0.24);
}

.streak-hero.is-goal-met::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, var(--gold) 0 2px, transparent 2.5px),
        radial-gradient(circle, var(--green) 0 2px, transparent 2.5px),
        radial-gradient(circle, var(--rose) 0 1.6px, transparent 2.2px),
        radial-gradient(circle, var(--blue) 0 1.7px, transparent 2.3px);
    background-position: 12% 24%, 36% 8%, 72% 20%, 88% 42%;
    background-size: 5rem 5rem, 5.8rem 5.8rem, 4.6rem 4.6rem, 5.2rem 5.2rem;
    opacity: 0.58;
    animation: goal-confetti 1500ms ease-out both;
}

.streak-celebration {
    position: relative;
    z-index: 1;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.65rem;
    padding: 0.5rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--green) 52%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--green) 18%, var(--surface));
    color: color-mix(in srgb, var(--green) 76%, var(--text));
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 22%, transparent);
    animation: goal-badge-pop 600ms cubic-bezier(.2, 0, .2, 1) both;
}

.streak-celebration span {
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: var(--green);
    color: var(--bg);
    font-weight: 900;
}

.goal-confetti-side {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.goal-confetti-side span {
    position: absolute;
    top: 48%;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--gold);
    opacity: 0;
    box-shadow: 0 0 0.65rem color-mix(in srgb, currentColor 42%, transparent);
}

.goal-confetti-side span:nth-child(odd) {
    left: 0.15rem;
    animation: side-confetti-left 980ms cubic-bezier(.2, 0, .2, 1) both;
}

.goal-confetti-side span:nth-child(even) {
    right: 0.15rem;
    animation: side-confetti-right 980ms cubic-bezier(.2, 0, .2, 1) both;
}

.goal-confetti-side span:nth-child(3n) {
    background: var(--green);
}

.goal-confetti-side span:nth-child(4n) {
    background: var(--rose);
}

.goal-confetti-side span:nth-child(5n) {
    background: var(--blue);
}

.goal-confetti-side span:nth-child(1) { top: 34%; animation-delay: 40ms; }
.goal-confetti-side span:nth-child(2) { top: 38%; animation-delay: 80ms; }
.goal-confetti-side span:nth-child(3) { top: 50%; animation-delay: 120ms; }
.goal-confetti-side span:nth-child(4) { top: 54%; animation-delay: 160ms; }
.goal-confetti-side span:nth-child(5) { top: 64%; animation-delay: 220ms; }
.goal-confetti-side span:nth-child(6) { top: 28%; animation-delay: 260ms; }
.goal-confetti-side span:nth-child(7) { top: 58%; animation-delay: 310ms; }
.goal-confetti-side span:nth-child(8) { top: 30%; animation-delay: 340ms; }
.goal-confetti-side span:nth-child(9) { top: 43%; animation-delay: 380ms; }
.goal-confetti-side span:nth-child(10) { top: 68%; animation-delay: 410ms; }
.goal-confetti-side span:nth-child(11) { top: 24%; animation-delay: 450ms; }
.goal-confetti-side span:nth-child(12) { top: 60%; animation-delay: 490ms; }

.streak-hero strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    font-variant-numeric: lining-nums;
    line-height: 0.95;
}

.streak-hero span,
.streak-hero p {
    color: var(--muted);
}

.streak-hero p {
    max-width: 42rem;
    margin: 0.35rem 0 0;
}

.streak-note-badge {
    position: relative;
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.16), transparent 1.6rem),
        color-mix(in srgb, var(--gold) 18%, var(--surface));
    animation: note-badge-pulse 2200ms ease-in-out infinite;
}

.streak-note-badge::before,
.streak-note-badge::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 32%, transparent);
    opacity: 0;
}

.streak-note-badge::before {
    width: 0.32rem;
    height: 0.32rem;
    left: 0.62rem;
    top: 0.8rem;
    animation: note-spark 2200ms ease-in-out infinite;
}

.streak-note-badge::after {
    width: 0.24rem;
    height: 0.24rem;
    right: 0.72rem;
    bottom: 0.78rem;
    animation: note-spark 2200ms 520ms ease-in-out infinite;
}

.streak-note-shape {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 999px;
    color: var(--gold-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1;
    transform-origin: 50% 75%;
    animation: note-sway 1600ms ease-in-out infinite;
}

.streak-hero.is-hot .streak-note-shape {
    color: var(--gold-strong);
}

.streak-hero.is-hot .streak-note-badge {
    border: 1px solid color-mix(in srgb, var(--green) 44%, var(--line));
    background: color-mix(in srgb, var(--green) 24%, var(--surface));
}

@keyframes note-sway {
    0%,
    100% {
        transform: rotate(-2deg) translateY(0);
    }
    50% {
        transform: rotate(4deg) translateY(-0.08rem);
    }
}

@keyframes note-badge-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 rgba(244, 179, 33, 0);
    }
    50% {
        box-shadow: 0 0 0 0.45rem rgba(244, 179, 33, 0.08);
    }
}

@keyframes note-spark {
    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }
    45% {
        opacity: 1;
        transform: translateY(-0.18rem) scale(1);
    }
}

.day-pill {
    position: relative;
}

.day-pill .day-icon {
    display: grid;
    min-width: 1.6rem;
    height: 1.6rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding-inline: 0.42rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.day-pill.is-studied .day-icon {
    border-color: color-mix(in srgb, var(--green) 70%, var(--line));
    background: var(--green);
    color: #06110f;
}

.day-pill.is-today:not(.is-studied) .day-icon {
    border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    color: var(--gold);
}

.streak-off-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.streak-off-panel p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.streak-goal-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(12px);
    animation: modal-fade-in 180ms ease both;
}

.streak-goal-card {
    position: relative;
    display: grid;
    gap: 0.85rem;
    width: min(34rem, 100%);
    padding: 1.35rem;
    border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 10rem),
        var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    animation: streak-card-pop 240ms cubic-bezier(.2, 0, .2, 1) both;
}

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

.streak-goal-card p {
    color: var(--muted);
}

.streak-goal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
    color: var(--muted);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.streak-goal-close:hover {
    border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
    color: var(--gold);
}

.streak-review {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem;
    border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 8%, transparent);
}

.streak-review-top {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
}

.streak-review-top span {
    color: var(--green);
    font-weight: 900;
}

.streak-review-bar {
    height: 0.7rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--green) 34%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.streak-review-bar span {
    display: block;
    width: var(--review-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), var(--green));
    box-shadow: 0 0 18px color-mix(in srgb, var(--green) 32%, transparent);
    animation: streak-review-fill 920ms cubic-bezier(.2, 0, .2, 1) both;
}

.streak-review-markers {
    display: flex;
    gap: 0.45rem;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.streak-goal-form,
.streak-goal-card form {
    margin: 0;
}

.streak-goal-options {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.streak-goal-options button {
    display: grid;
    min-height: 4rem;
    place-items: center;
    gap: 0.08rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.streak-goal-options button:hover,
.streak-goal-options button.is-current,
.streak-goal-options button.is-selected {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
    background: color-mix(in srgb, var(--gold) 15%, var(--surface));
}

.streak-goal-options strong {
    color: var(--gold-strong);
    font-size: 1.35rem;
}

.streak-goal-options span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.daily-tip-card {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 18;
    display: grid;
    gap: 0.32rem;
    width: min(18rem, calc(100vw - 2rem));
    padding: 0.9rem 2.3rem 0.95rem 0.95rem;
    border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
    border-radius: 14px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 7rem),
        color-mix(in srgb, var(--surface-strong) 94%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    animation: daily-tip-in 300ms ease both;
    touch-action: pan-y;
}

.daily-tip-card button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.daily-tip-card button:hover {
    border-color: var(--line);
    color: var(--gold);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.daily-tip-card strong {
    color: var(--text);
}

.daily-tip-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.daily-tip-card.is-hiding {
    animation: daily-tip-out 170ms ease both;
}

.daily-tip-card.is-swiping {
    transition: none;
}

.status-paid {
    border-color: color-mix(in srgb, var(--green) 54%, var(--line)) !important;
    background: color-mix(in srgb, var(--green) 15%, var(--surface)) !important;
}

.student-status-panel.status-paid {
    border-color: var(--line) !important;
    background: var(--surface) !important;
}

.student-status-panel.status-late,
.student-status-panel.status-reported {
    background: var(--surface) !important;
}

.student-status-panel .simple-stats > div:not(.status-paid-text):not(.status-late-text) strong {
    color: var(--text);
}

.status-paid strong {
    color: #58e89b;
}

.status-paid-row {
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--green) 48%, var(--line)) !important;
    border-radius: var(--radius-sm);
    border-color: color-mix(in srgb, var(--green) 48%, var(--line)) !important;
    background: color-mix(in srgb, var(--green) 12%, var(--surface)) !important;
}

.status-paid-row strong,
.status-paid-text strong {
    color: #58e89b;
}

.status-late-text strong {
    color: #ff8a8a;
}

.title-link {
    color: inherit;
    text-decoration: none;
}

.title-link:hover {
    color: var(--gold);
}

.calendar-day[data-day-trigger] {
    cursor: pointer;
}

.calendar-day[data-day-trigger]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.day-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.64);
    animation: fade-in 140ms ease;
}

.day-popover {
    position: absolute;
    z-index: 80;
    width: min(24rem, calc(100vw - 1.5rem));
    max-height: min(28rem, calc(100vh - 1.5rem));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
    animation: popover-in 120ms ease;
}

.day-modal {
    position: relative;
    width: min(26rem, 100%);
    max-height: min(34rem, calc(100vh - 2rem));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.day-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 1;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
}

.day-modal-body {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 2.8rem 1rem 1rem;
}

.day-detail-heading h2 {
    margin: 0.2rem 0 0;
    font-size: 1.45rem;
    text-transform: none;
}

.day-detail-note,
.day-detail-empty {
    margin: 0;
    color: var(--muted);
}

.day-detail-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.day-detail-list li {
    display: grid;
    gap: 0.12rem;
    padding: 0.7rem;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: var(--bg-soft);
}

.day-detail-list li.event {
    border-left-color: var(--teal);
}

.day-detail-list li.fee {
    border-left-color: var(--green);
}

.day-detail-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

.week-mode-toggle,
.sync-preferences {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.week-mode-toggle {
    justify-self: end;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
}

.week-mode-toggle button {
    min-height: 2rem;
    border: 0;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.week-mode-toggle button:hover,
.week-mode-toggle button.is-active {
    background: var(--gold);
    color: var(--on-gold);
}

.teacher-week {
    max-height: 34rem;
    overflow-y: auto;
    padding-right: 0.2rem;
    overscroll-behavior: contain;
}

.teacher-week-shell.is-compact .week-item {
    gap: 0;
    padding-block: 0.45rem;
}

.teacher-week-shell.is-compact .week-item span {
    display: none;
}

.teacher-week-shell.is-compact .teacher-week-day {
    min-height: 7.2rem;
}

.sync-preferences {
    padding-top: 0.35rem;
}

.sync-preferences label {
    color: var(--muted);
    font-weight: 800;
}

.sync-preferences select {
    min-height: 2.35rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    padding: 0.35rem 0.6rem;
    font: inherit;
}

.google-warning {
    align-items: center;
    justify-content: space-between;
}

.google-warning span {
    flex: 1 1 auto;
}

.student-subnav-section {
    gap: 0.85rem;
}

.student-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.student-subnav button {
    min-height: 2.45rem;
    border: 0;
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.student-subnav button:hover,
.student-subnav button.is-active {
    background: color-mix(in srgb, var(--gold) 18%, var(--surface));
    color: var(--text);
}

.student-tab-panel {
    display: none;
}

.student-tab-panel.is-active {
    display: block;
}

.student-detail-stack {
    display: grid;
    gap: 1.25rem;
}

.student-detail-stack > .panel {
    width: 100%;
}

.weekly-plan-panel {
    gap: 0.75rem;
}

.weekly-plan-form {
    display: grid;
    gap: 0.7rem;
}

.form-section-block {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--gold) 6%, transparent);
}

.form-section-block.is-student-specific {
    border-color: color-mix(in srgb, var(--green) 26%, var(--line));
    background: color-mix(in srgb, var(--green) 5%, transparent);
}

.form-section-block .muted-note {
    margin: 0;
}

.material-picker {
    position: relative;
    display: grid;
    gap: 0.55rem;
}

.material-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.material-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 12;
    display: grid;
    width: min(34rem, 100%);
    max-height: 18rem;
    overflow: auto;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.material-suggestions[hidden] {
    display: none;
}

.material-suggestions button,
.material-suggestions a {
    display: grid;
    gap: 0.1rem;
    min-height: auto;
    padding: 0.7rem 0.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.material-suggestions button:hover,
.material-suggestions a:hover {
    background: color-mix(in srgb, var(--gold) 12%, transparent);
}

.material-suggestions button span,
.material-suggestions a span {
    color: var(--muted);
    font-size: 0.85rem;
}

.inline-suggestions {
    top: calc(100% + 0.35rem);
}

.material-title-checker {
    position: relative;
}

.material-lock-note {
    margin: 0;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 800;
}

.is-locked {
    background:
        repeating-linear-gradient(-45deg, transparent 0 0.55rem, rgba(255, 255, 255, 0.018) 0.55rem 1.1rem),
        color-mix(in srgb, var(--surface) 74%, var(--bg)) !important;
    color: var(--muted) !important;
    cursor: not-allowed;
}

.weekly-select-list {
    display: grid;
    gap: 0.9rem;
}

.weekly-select-item {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 28%, transparent);
}

.weekly-select-item.is-selected {
    background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.weekly-select-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.weekly-select-card strong,
.weekly-select-card small {
    display: block;
}

.weekly-select-card small {
    margin-top: 0.18rem;
    color: var(--muted);
}

.weekly-select-item textarea {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
}

.weekly-study-item textarea {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
}

.weekly-study-item label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.inline-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}

.suggest-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem);
    gap: 0.75rem;
    align-items: end;
}

.suggest-select {
    min-height: 2.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--bg);
    color: var(--text);
    padding-inline: 0.75rem;
    font: inherit;
}

.student-list {
    display: grid;
    gap: 0.85rem;
    width: 100%;
}

.student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 5.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.student-row:hover,
.student-row:focus-visible {
    border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
    background: color-mix(in srgb, var(--gold) 5%, var(--surface));
    transform: translateY(-1px);
}

.student-row strong,
.student-row span,
.student-row small {
    display: block;
}

.student-row strong {
    margin-bottom: 0.18rem;
}

.student-row span,
.student-row small {
    color: var(--muted);
}

.student-row small {
    margin-top: 0.28rem;
}

.check-row {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    color: var(--text);
    font-weight: 800;
}

.check-row input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--gold);
}

.student-study-tabs {
    scroll-margin-top: 6rem;
    gap: 0.75rem;
}

.student-study-tabs .student-tab-panel {
    padding-top: 0.15rem;
}

.student-page .student-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.7fr);
    gap: 1.25rem;
}

.student-page .streak-panel,
.student-page .streak-off-panel {
    grid-column: 1 / -1;
    order: 1;
}

.student-page .student-study-tabs {
    grid-column: 1 / -1;
    order: 2;
    min-height: 0;
}

.student-page .student-calendar-card {
    grid-column: 1;
    order: 3;
    width: 100%;
    justify-self: stretch;
}

.student-page .student-calendar-card .panel-heading {
    justify-content: flex-start;
    text-align: left;
}

.student-page .student-calendar-card .calendar-weekdays,
.student-page .student-calendar-card .calendar-grid {
    width: 100%;
}

.student-side-stack {
    grid-column: 2;
    order: 4;
    display: grid;
    gap: 1.25rem;
    align-self: start;
}

.student-quick-panel {
    --quick-accent: var(--gold);
    min-height: 10rem;
    align-content: start;
    border-left-color: color-mix(in srgb, var(--quick-accent) 44%, var(--line));
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.student-quick-panel .fee-report-form {
    margin-top: 0.25rem;
}

.student-quick-panel:nth-child(1) {
    --quick-accent: var(--teal);
}

.student-quick-panel:nth-child(2) {
    --quick-accent: var(--green);
}

.student-quick-panel:nth-child(3) {
    --quick-accent: var(--gold);
}

.student-quick-panel:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--quick-accent) 38%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 82%, var(--surface));
}

@media (max-width: 900px) {
    .student-page .student-layout {
        grid-template-columns: 1fr;
    }

    .student-page .student-calendar-card,
    .student-side-stack {
        grid-column: 1;
    }
}

.weekly-note-box {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.weekly-note-box p {
    margin: 0;
    color: var(--muted);
}

.study-area-list {
    display: grid;
    gap: 0.42rem;
}

.study-area-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    overflow: hidden;
    transition: border-color 160ms ease, background 160ms ease;
}

.study-area-card:hover {
    border-color: color-mix(in srgb, var(--gold) 28%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 76%, var(--surface));
}

.study-area-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    cursor: pointer;
    padding: 0.48rem 0.68rem;
    color: var(--text);
    font-weight: 800;
    list-style: none;
}

.study-area-card > summary::-webkit-details-marker,
.study-item-card > summary::-webkit-details-marker {
    display: none;
}

.study-area-card > summary::before {
    content: "\266B";
    display: inline-grid;
    width: 1.18rem;
    height: 1.18rem;
    flex: 0 0 1.18rem;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    line-height: 1;
}

.study-area-card > summary span {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.78rem;
}

.study-area-card > summary::after,
.study-item-card > summary::after,
.submission-card > summary::after,
.inline-details > summary::after {
    content: "v";
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.study-area-card[open] > summary::after,
.study-item-card[open] > summary::after,
.submission-card[open] > summary::after,
.inline-details[open] > summary::after {
    content: "^";
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.study-item-card {
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 34%, transparent);
    transition: background 160ms ease;
}

.study-item-card:hover {
    background: color-mix(in srgb, var(--gold) 5%, var(--bg));
}

.study-item-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    min-height: 2.65rem;
    padding: 0.48rem 0.68rem;
    cursor: pointer;
    list-style: none;
}

.study-item-card > summary::before {
    content: "\266A";
    display: inline-grid;
    width: 1.18rem;
    height: 1.18rem;
    flex: 0 0 1.18rem;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    color: var(--gold);
    font-size: 0.78rem;
}

.study-item-card > summary strong,
.study-item-card > summary small {
    display: block;
}

.study-item-card > summary small {
    margin-top: 0.08rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.study-item-card[open] > summary {
    background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.study-item-card.is-completed {
    opacity: 0.92;
}

.study-item-body {
    display: grid;
    gap: 0.42rem;
    padding: 0 0.68rem 0.68rem 2.45rem;
}

.study-item-body p {
    margin: 0;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.35rem;
    border: 1px solid color-mix(in srgb, var(--gold) 54%, var(--line));
    border-radius: 999px;
    padding: 0.14rem 0.42rem;
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-chip.muted {
    border-color: var(--line);
    color: var(--muted);
}

.status-chip.done {
    border-color: color-mix(in srgb, var(--green) 55%, var(--line));
    color: var(--green);
}

.summary-progress {
    display: grid;
    gap: 0.18rem;
    width: min(9rem, 20vw);
    min-width: 5.4rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: right;
}

.summary-progress .duo-progress {
    height: 0.42rem;
}

.summary-progress .duo-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), var(--green));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.summary-progress .progress-level-1 i {
    background: linear-gradient(90deg, #ff8a8a, #e45050);
}

.summary-progress .progress-level-2 i {
    background: linear-gradient(90deg, #ffd36a, #f4b321);
}

.summary-progress .progress-level-3 i {
    background: linear-gradient(90deg, #65d6c2, #27a892);
}

.summary-progress .progress-level-4 i {
    background: linear-gradient(90deg, #58e89b, #20b875);
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    padding: 0.34rem 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
}

.submissions-layout {
    display: grid;
    gap: 1.25rem;
    width: min(980px, 100%);
    margin-inline: auto;
}

.submission-compose-panel {
    gap: 1rem;
}

.submission-form {
    display: grid;
    gap: 0.95rem;
}

.submission-form .button {
    justify-self: start;
}

.submission-form .field-grid {
    gap: 0.9rem;
}

.submission-list {
    display: grid;
    gap: 0.7rem;
}

.submission-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.submission-card > summary {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.submission-card > summary::-webkit-details-marker {
    display: none;
}

.submission-card > summary::before {
    content: "";
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 1.1rem;
    border: 1.7px solid var(--gold);
    border-radius: 4px;
    box-shadow: inset 0 -0.28rem 0 color-mix(in srgb, var(--gold) 12%, transparent);
}

.submission-card-main {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
    margin-right: auto;
}

.submission-card-main small {
    color: var(--muted);
}

.submission-body {
    display: grid;
    gap: 0.75rem;
    padding: 0 0.85rem 0.9rem 3rem;
}

.submission-body p {
    margin: 0;
}

.response-thread {
    display: grid;
    gap: 0.55rem;
}

.response-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
    border-radius: var(--radius-xs);
    background: color-mix(in srgb, var(--green) 8%, transparent);
}

.submission-response-form {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.2rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.student-calendar-page {
    display: grid;
    grid-template-columns: minmax(0, 980px);
    gap: 1.05rem;
    align-items: start;
    justify-content: center;
    width: min(1080px, calc(100% - 2rem));
    margin-inline: auto;
}

.student-materials-page {
    display: grid;
    grid-template-columns: minmax(320px, 660px) minmax(260px, 340px);
    gap: 1.1rem;
    align-items: start;
    justify-content: center;
    width: min(1080px, calc(100% - 2rem));
    margin-inline: auto;
}

.student-calendar-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem;
}

.student-calendar-main-card {
    width: 100%;
}

.student-calendar-main-card,
.student-page .student-calendar-main-card {
    width: min(720px, 100%);
    justify-self: center;
}

.student-policy-page {
    width: min(900px, calc(100% - 2rem));
    margin-inline: auto;
}

.policy-stack {
    display: grid;
    gap: 0.85rem;
}

.policy-card summary {
    align-items: center;
}

.policy-body {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.8rem;
    color: var(--text);
}

.policy-body p {
    margin: 0;
    color: var(--muted);
}

.student-calendar-side {
    display: grid;
    gap: 0.8rem;
}

.reschedule-request-form {
    gap: 0.85rem;
}

.lesson-choice-list {
    display: grid;
    gap: 0.42rem;
}

.lesson-choice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    cursor: pointer;
}

.student-calendar-page .inline-details > summary {
    min-height: 3rem;
}

.student-calendar-page .inline-details > p,
.student-calendar-page .inline-details > form,
.student-calendar-page .inline-details > .submission-list {
    margin-top: 0.75rem;
}

.lesson-choice:hover {
    border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
    background: color-mix(in srgb, var(--gold) 6%, var(--surface));
}

.lesson-choice.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.lesson-choice span {
    display: grid;
    gap: 0.08rem;
}

.lesson-choice small {
    color: var(--muted);
}

.material-library-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.65rem;
}

.material-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.material-filter-bar button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.42rem 0.7rem;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.material-filter-bar button:hover,
.material-filter-bar button.is-active {
    border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
    background: color-mix(in srgb, var(--gold) 14%, var(--surface));
    color: var(--text);
}

.material-library-card {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 0.7rem;
    align-items: center;
    min-height: 4.2rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.material-library-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
    background: color-mix(in srgb, var(--gold) 7%, var(--surface));
}

.material-resource-icon {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    color: var(--gold);
    font-weight: 900;
}

.material-library-card strong,
.material-library-card small {
    display: block;
}

.material-library-card small {
    color: var(--muted);
}

.calendar-guide-card .guide-list,
.reschedule-inline-form {
    gap: 0.65rem;
}

.lesson-status-actions {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

@media (max-width: 900px) {
    .student-calendar-page,
    .student-materials-page {
        grid-template-columns: 1fr;
    }

    .student-calendar-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .student-calendar-page,
    .student-materials-page {
        width: calc(100% - 1rem);
        gap: 0.75rem;
    }

    .student-calendar-main-card,
    .student-page .student-calendar-main-card,
    .student-page .student-calendar-card {
        width: 100%;
        max-width: 100%;
    }
}

.submission-inline-action {
    margin: 0.15rem 0 0;
}

.submission-status-aberto {
    border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
    color: var(--gold);
}

.submission-status-respondido {
    border-color: color-mix(in srgb, var(--green) 52%, var(--line));
    color: var(--green);
}

.submission-status-arquivado {
    border-color: var(--line);
    color: var(--muted);
}

.student-submission-card {
    text-decoration: none;
}

.student-submission-card strong {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.teacher-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.teacher-hero-stats span {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    min-height: 2.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    padding: 0.35rem 0.6rem;
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    color: var(--muted);
    font-weight: 700;
}

.teacher-hero-stats strong {
    color: var(--text);
}

.resource-link:hover {
    border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
    color: var(--gold);
}

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

.settings-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    padding: 0.72rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    cursor: pointer;
}

.settings-row input {
    margin-top: 0.25rem;
    accent-color: var(--gold);
}

.settings-row strong,
.settings-row small {
    display: block;
}

.settings-row small {
    color: var(--muted);
}

.profile-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.resource-link.drive {
    color: #8ed7ff;
}

.resource-link.youtube {
    color: #ff8a8a;
}

.drive-mark {
    position: relative;
    display: inline-block;
    width: 1.05rem;
    height: 0.95rem;
    flex: 0 0 1.05rem;
    transform: translateY(0.02rem);
}

.drive-mark::before,
.drive-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 100% 84%, 0 84%);
}

.drive-mark::before {
    background: conic-gradient(from 30deg, #1a73e8 0 33%, #34a853 0 66%, #fbbc04 0 100%);
}

.drive-mark::after {
    inset: 0.27rem 0.3rem 0.25rem;
    background: var(--surface);
}

.progress-edit-form {
    display: grid;
    gap: 0.55rem;
}

.progress-edit-row {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) 4.5rem auto auto;
    align-items: center;
    gap: 0.55rem;
}

.progress-edit-row input[type="range"] {
    accent-color: var(--gold);
}

.progress-edit-row input[type="number"] {
    min-height: 2.6rem;
    padding-inline: 0.65rem;
}

.duo-progress {
    height: 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 60%, transparent);
    box-shadow: inset 0 2px 0 color-mix(in srgb, #000 24%, transparent);
}

.duo-progress span {
    border-radius: inherit;
    background: linear-gradient(180deg, #2eeaa8, #16b883);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22);
}

.duo-progress.progress-level-1 span {
    background: linear-gradient(180deg, #ff8a8a, #e45050);
}

.duo-progress.progress-level-2 span {
    background: linear-gradient(180deg, #ffd36a, #f4b321);
}

.duo-progress.progress-level-3 span {
    background: linear-gradient(180deg, #65d6c2, #27a892);
}

.duo-progress.progress-level-4 span {
    background: linear-gradient(180deg, #58e89b, #20b875);
}

.topic-list {
    display: grid;
    gap: 0.75rem;
}

.compact-topic-list {
    gap: 0.5rem;
}

.topic-builder {
    gap: 0.8rem;
}

.topic-builder-list {
    display: grid;
    gap: 0.75rem;
}

.topic-builder-row {
    background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.topic-card {
    position: relative;
    display: grid;
    gap: 0.48rem;
    padding: 0.68rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.topic-card p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.study-confetti {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 0;
    height: 0;
    pointer-events: none;
    animation: confetti-anchor 760ms ease-out both;
}

.study-confetti i {
    position: absolute;
    width: 0.38rem;
    height: 0.72rem;
    border-radius: 2px;
    background: var(--gold);
    animation: confetti-piece 760ms ease-out both;
}

.study-confetti i:nth-child(2) {
    background: var(--green);
    transform: rotate(24deg);
    animation-delay: 40ms;
}

.study-confetti i:nth-child(3) {
    background: #ff8a8a;
    transform: rotate(-28deg);
    animation-delay: 70ms;
}

.study-confetti i:nth-child(4) {
    background: #65d6c2;
    transform: rotate(42deg);
    animation-delay: 100ms;
}

.study-confetti i:nth-child(5) {
    background: #ffffff;
    transform: rotate(-54deg);
    animation-delay: 130ms;
}

@keyframes confetti-anchor {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes confetti-piece {
    from {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }
    to {
        opacity: 0;
        transform: translate(calc((var(--x, 1) * 2rem)), -2.6rem) rotate(160deg);
    }
}

.study-confetti i:nth-child(1) { --x: -1.3; }
.study-confetti i:nth-child(2) { --x: -0.55; }
.study-confetti i:nth-child(3) { --x: 0.15; }
.study-confetti i:nth-child(4) { --x: 0.85; }
.study-confetti i:nth-child(5) { --x: 1.35; }

.study-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 0;
    height: 0;
    pointer-events: none;
}

.study-burst i {
    position: absolute;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--gold);
    animation: study-burst-piece 820ms cubic-bezier(.2, 0, .2, 1) both;
}

.study-burst.is-strong i {
    width: 0.46rem;
    height: 0.46rem;
}

.study-burst i:nth-child(2) { background: var(--green); --x: 1; --y: -1.05; animation-delay: 35ms; }
.study-burst i:nth-child(3) { background: var(--rose); --x: -1.1; --y: -0.85; animation-delay: 70ms; }
.study-burst i:nth-child(4) { background: var(--blue); --x: 0.65; --y: 1; animation-delay: 105ms; }
.study-burst i:nth-child(5) { background: #ffffff; --x: -0.7; --y: 1.05; animation-delay: 140ms; }
.study-burst i:nth-child(6) { background: var(--gold-strong); --x: 1.25; --y: 0.18; animation-delay: 175ms; }
.study-burst i:nth-child(7) { background: var(--green); --x: -1.25; --y: 0.05; animation-delay: 210ms; }

@keyframes study-burst-piece {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.65);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--x, 0) * 3.2rem), calc(-50% + var(--y, -1) * 2.4rem)) scale(1.1);
    }
}

.compact-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-weight: 800;
}

.teacher-hero h1 .title-link {
    display: inline-flex;
}

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

@keyframes popover-in {
    from {
        opacity: 0;
        transform: translateY(-0.25rem) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes streak-card-pop {
    from {
        opacity: 0;
        transform: translateY(0.35rem) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes streak-review-fill {
    from {
        width: 0;
    }
}

@keyframes daily-tip-in {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes daily-tip-out {
    to {
        opacity: 0;
        transform: translateY(0.25rem);
    }
}

@keyframes daily-tip-timer {
    from {
        width: calc(100% - 1.4rem);
    }
    to {
        width: 0;
    }
}

@keyframes piano-drift {
    from {
        transform: rotate(-9deg) translate3d(0, 0, 0);
    }
    to {
        transform: rotate(-7deg) translate3d(-0.6rem, 0.35rem, 0);
    }
}

@keyframes piano-drift-left {
    from {
        transform: rotate(8deg) translate3d(0, 0, 0);
    }
    to {
        transform: rotate(6deg) translate3d(0.7rem, -0.25rem, 0);
    }
}

@keyframes piano-color-breathe {
    0%,
    100% {
        opacity: 0.58;
        filter: saturate(0.94) brightness(0.98);
    }
    50% {
        opacity: 0.82;
        filter: saturate(1.18) brightness(1.08);
    }
}

@keyframes piano-key-pulse {
    0%,
    100% {
        opacity: 0.14;
        transform: translateY(0) scaleY(1);
        filter: saturate(0.95) brightness(0.95);
    }
    28% {
        opacity: 0.78;
        transform: translateY(0.16rem) scaleY(0.92);
        filter: saturate(1.35) brightness(1.18);
    }
    52% {
        opacity: 0.28;
        transform: translateY(0.03rem) scaleY(0.98);
        filter: saturate(1.05) brightness(1.02);
    }
}

@keyframes goal-confetti {
    0% {
        opacity: 0;
        transform: translate3d(0, -0.6rem, 0) scale(0.95);
    }
    18% {
        opacity: 0.82;
    }
    100% {
        opacity: 0.18;
        transform: translate3d(0, 0.9rem, 0) scale(1.04);
    }
}

@keyframes goal-badge-pop {
    0% {
        opacity: 0;
        transform: translateY(0.3rem) scale(0.9);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 28%, transparent);
    }
    55% {
        opacity: 1;
        transform: translateY(-0.04rem) scale(1.04);
        box-shadow: 0 0 0 0.45rem color-mix(in srgb, var(--green) 12%, transparent);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent);
    }
}

@keyframes side-confetti-left {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.55);
    }
    22% {
        opacity: 0.82;
    }
    100% {
        opacity: 0;
        transform: translate3d(7.2rem, -2.2rem, 0) scale(1.18);
    }
}

@keyframes side-confetti-right {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.55);
    }
    22% {
        opacity: 0.82;
    }
    100% {
        opacity: 0;
        transform: translate3d(-7.2rem, -2.2rem, 0) scale(1.18);
    }
}

@keyframes ambient-note-float {
    0% {
        opacity: 0;
        transform: translate3d(0, 1.1rem, 0) scale(0.92) rotate(-5deg);
    }
    18% {
        opacity: 0.22;
    }
    62% {
        opacity: 0.16;
        transform: translate3d(0.45rem, -1.65rem, 0) scale(1) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translate3d(0.7rem, -2.45rem, 0) scale(0.96) rotate(9deg);
    }
}

@keyframes ambient-note-depth-float {
    0% {
        opacity: 0;
        transform: translate3d(0, 1.6rem, 0) scale(0.92) rotate(-8deg);
    }
    20% {
        opacity: 0.18;
    }
    64% {
        opacity: 0.13;
        transform: translate3d(-0.7rem, -2.35rem, 0) scale(1.04) rotate(7deg);
    }
    100% {
        opacity: 0;
        transform: translate3d(-1.05rem, -3.35rem, 0) scale(1) rotate(11deg);
    }
}

@keyframes icon-lift {
    0%,
    100% {
        transform: translateY(0) rotate(0);
    }
    45% {
        transform: translateY(-0.12rem) rotate(-4deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}

@media (max-width: 760px) {
    .piano-keys-ambient {
        right: -6.5rem;
        top: 7rem;
        width: 14rem;
        height: 4.2rem;
        opacity: 0.16;
    }

    .ambient-note {
        font-size: 1.35rem;
    }

    .streak-goal-modal {
        align-items: end;
        padding: 0.75rem;
    }

    .streak-goal-card {
        max-height: calc(100vh - 1.5rem);
        overflow: auto;
        padding: 1.05rem;
        border-radius: 18px;
    }

    .streak-goal-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .daily-tip-card {
        right: 0.75rem;
        bottom: calc(5.65rem + env(safe-area-inset-bottom));
        width: min(20rem, calc(100vw - 1.5rem));
    }

    .daily-tip-card::after {
        content: "";
        position: absolute;
        left: 0.7rem;
        bottom: 0.45rem;
        height: 0.12rem;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--gold), var(--green));
        animation: daily-tip-timer 9s linear both;
    }

}

@media (max-width: 760px) {
    .suggest-field {
        grid-template-columns: 1fr;
    }

    .progress-edit-row {
        grid-template-columns: 1fr 4.5rem auto;
    }

    .summary-progress {
        width: 100%;
        max-width: 8rem;
        grid-column: 1 / -1;
        text-align: left;
    }

    .progress-edit-row .button {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .study-toggle-form.is-celebrating .study-toggle-button,
    .streak-note-badge,
    .streak-note-badge::before,
    .streak-note-badge::after,
    .streak-note-shape,
    .streak-goal-modal,
    .streak-goal-card,
    .streak-review-bar span,
    .goal-confetti-side,
    .piano-key-pulse,
    .daily-tip-card,
    .day-modal-backdrop,
    .day-popover {
        animation: none;
    }
}

@media (max-width: 759px) {
    .streak-off-panel {
        grid-template-columns: 1fr;
    }

    .streak-actions,
    .google-warning {
        align-items: stretch;
        justify-content: stretch;
    }

    .teacher-streak-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-streak-heading > form,
    .teacher-streak-heading .study-toggle-button {
        width: 100%;
    }

    .teacher-streak-settings-body {
        grid-template-columns: 1fr;
    }

    .week-mode-toggle {
        justify-self: start;
    }
}

.student-secondary-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.student-secondary-grid > .panel {
    display: grid;
    min-height: 9rem;
    align-content: start;
}

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

    .student-detail-actions {
        justify-content: flex-start;
    }
}

@media (min-width: 760px) {
    .teacher-section.two-panel-section {
        align-items: start;
    }

    .teacher-section.two-panel-section > .panel,
    .teacher-section.two-panel-section > form.panel {
        height: auto;
    }
}
