:root {
    --paper: #ffffff;
    --white: #ffffff;
    --ink: #1c1c1e;
    --muted: #625b58;
    --accent: #5b3e5c;
    --accent-hover: #4b324c;
    --soft-accent: #8d7890;
    --rule: #ded5ce;
    --quiet: #f3eee8;
    --green: #7f8f5f;
    --green-readable: #5f6e45;
    --green-soft: rgba(127, 143, 95, 0.14);
    --warning: #a66c61;
    --warning-soft: rgba(166, 108, 97, 0.13);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; }
body { min-width: 320px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }

.portal-header {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 28px);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
}

.brand { display: inline-flex; align-items: center; height: 52px; }
.brand-logo { display: block; height: 52px; width: auto; max-width: 190px; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 12px; }
.header-context { letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; color: var(--muted); }
.profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    color: var(--ink);
    font-size: 0;
}
.profile-icon {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    border: 1px solid var(--rule);
    border-radius: 50%;
    padding: 8px;
    background: var(--paper);
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.profile-link:hover { color: var(--accent); }
.profile-link:hover .profile-icon { border-color: var(--soft-accent); background: var(--quiet); }
.profile-link:active .profile-icon { background: var(--quiet); }

.portal-body { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: calc(100vh - 74px); }
.portal-nav { position: sticky; top: 0; height: calc(100vh - 74px); padding: 52px 28px 30px; border-right: 1px solid var(--rule); background: rgba(243, 238, 232, 0.42); display: flex; flex-direction: column; gap: 5px; }
.nav-kicker, .eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 10px;
    font-weight: 600;
}
.nav-kicker { margin-bottom: 19px; padding-bottom: 15px; border-bottom: 1px solid var(--rule); }
.portal-nav a { display: flex; min-height: 44px; align-items: center; color: var(--muted); padding: 11px 12px; border-left: 2px solid transparent; font-size: 13px; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.portal-nav a:hover { color: var(--ink); }
.portal-nav a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(91, 62, 92, 0.06); }
.nav-footer { margin-top: auto; color: var(--muted); font-size: 10px; display: flex; flex-direction: column; gap: 5px; letter-spacing: .04em; }
.nav-footer small { color: var(--soft-accent); font-size: 10px; }
.nav-rule { display: block; width: 28px; border-top: 1px solid var(--accent); margin-bottom: 7px; }
.mobile-nav {
    position: fixed; left: 50%; bottom: 0; z-index: 20;
    display: none; grid-template-columns: repeat(4, minmax(0,1fr));
    width: min(100%, 760px); height: 72px; padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    transform: translateX(-50%); border-top: 1px solid rgba(222,213,206,.88); background: rgba(243,238,232,.84); backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
}
.mobile-nav a {
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
    color: var(--muted); font-size: 10px; border-top: 1px solid transparent; min-height: 44px; cursor: pointer;
}
.mobile-nav a.active { color: var(--accent); border-top-color: var(--accent); }
.mobile-nav a.active .nav-svg { stroke-width: 2; }
.nav-svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.portal-main { width: min(100%, 1180px); min-height: calc(100vh - 74px); margin: 0 auto; padding: 24px 20px 90px; animation: page-in .3s ease both; }
.page-intro { max-width: 650px; margin-bottom: 32px; animation: reveal .45s ease both; }
.page-intro { position: relative; padding-bottom: 23px; }
.page-intro::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    border: 0;
    clip-path: none;
    opacity: 0;
    pointer-events: none;
}
.wdd-mountain-line { display: block; width: 100%; height: 40px; margin-top: 16px; overflow: visible; }
.wdd-mountain-line path { fill: none; stroke: var(--green); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .4; }
.page-ending-mountains { margin: 28px 0 18px; }
.page-intro > * { position: relative; z-index: 1; }
.page-intro h1 {
    margin-top: 8px;
    margin-bottom: 10px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}
.intro-copy { max-width: 500px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.loading-state { color: var(--muted); }

body:has(.login-front-door) .portal-header,
body:has(.login-front-door) .portal-nav,
body:has(.login-front-door) .mobile-nav,
body:has(.login-front-door) .portal-footer,
body:has(.login-front-door) .wdd-entry-splash { display: none; }
body:has(.login-front-door) .account-route-topline { display: none; }
body:has(.login-front-door) .portal-body { display: block; min-height: 100vh; }
body:has(.login-front-door) .portal-main { width: 100%; max-width: none; min-height: 100vh; padding: 0; }
.login-front-door {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--accent);
    color: var(--paper);
    text-align: center;
}
.login-symbol {
    display: block;
    width: min(58vw, 250px);
    max-height: 230px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(90%) sepia(9%) saturate(220%) hue-rotate(245deg) brightness(104%) contrast(92%);
    animation: login-symbol-in .9s ease both;
}
.login-motto {
    max-width: 300px;
    margin-top: 28px;
    color: #d9cde0;
    font-size: 10px;
    letter-spacing: .18em;
    line-height: 1.8;
    animation: login-motto-in .9s 1s ease both;
}
.login-enter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 48px;
    margin-top: 34px;
    padding: 0 24px;
    border: 1px solid var(--paper);
    border-radius: 8px;
    background: var(--paper);
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}
.login-enter:hover { background: #e8dfd8; }
.login-enter:active { transform: translateY(1px); }
.login-enter:focus-visible { outline: 2px solid #d9cde0; outline-offset: 4px; }
.wdd-entry-splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: var(--accent);
    opacity: 1;
    pointer-events: none;
    transition: opacity .32s ease;
}
.wdd-entry-splash.is-hidden { opacity: 0; pointer-events: none; }
.wdd-entry-splash img {
    width: min(48vw, 190px);
    max-height: 190px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(90%) sepia(9%) saturate(220%) hue-rotate(245deg) brightness(104%) contrast(92%);
    animation: login-symbol-in .9s ease both;
}

.next-class {
    margin-bottom: 30px;
    padding: 24px 22px 22px;
    background: var(--quiet);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    animation: reveal .45s .06s ease both;
}
.next-class-context { margin-top: 22px; }
.next-class-context h2 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: clamp(29px, 4vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.next-class-context h2 span { color: var(--soft-accent); }
.next-class-schedule {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 9px;
    margin-top: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(155, 129, 123, .38);
}
.next-class-day {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.next-class-time {
    color: var(--muted);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    display: flex;
    align-items: baseline;
    gap: 10px;
    line-height: 1;
}
.next-class-time strong { color: var(--accent); font-size: clamp(48px, 11vw, 72px); font-weight: 400; letter-spacing: -.03em; }
.next-class-time small { color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; letter-spacing: .02em; }
.next-class-context { margin-top: 19px; }
.next-class-context h2 {
    font-size: clamp(21px, 4vw, 29px);
}
.next-class-context p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}
.next-class-teacher {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px;
}
.next-class-teacher span {
    color: var(--soft-accent);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-section { margin-bottom: 56px; animation: reveal .35s .12s ease both; }
.home-payments { max-width: 640px; }
.home-payments-good { color: var(--green-readable); }
.home-payments-status { color: var(--quiet); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.home-payments-status.overdue { color: var(--warning); }
.home-payments-status.this-month { color: var(--muted); }
.home-payments-status.good { color: var(--green-readable); }
.home-payment-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.home-payment-line-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-payment-line-copy strong { font-size: 16px; font-weight: 500; }
.home-payment-line-copy span { color: var(--muted); font-size: 13px; }
.home-payment-line-amount { flex: 0 0 auto; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 28px; font-weight: 400; line-height: 1; }
.home-payment-line-amount.overdue { color: var(--warning); }
.home-payment-line-copy .home-payment-late { color: var(--warning); font-size: 14px; font-weight: 500; }
.home-payments-more { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.home-payments-action { margin-top: 16px; }
.text-link.home-payments-link { display: inline-flex; min-height: 48px; align-items: center; color: var(--accent); font-size: 14px; }
.latest-notice { margin-bottom: 24px; }
.latest-notice-link { display: flex; flex-direction: column; gap: 6px; margin: 8px -10px 0; padding: 12px 10px; border-radius: 10px; color: var(--ink); transition: background-color .15s ease; -webkit-tap-highlight-color: transparent; }
.latest-notice-link:active { background: var(--quiet); }
.latest-notice-link span { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 20px; }
.latest-notice-link small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
}
.section-heading h2 {
    margin-top: 8px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-size: 12px;
    line-height: 1.2;
    min-height: 44px;
    padding: 12px 0;
    white-space: nowrap;
}
.text-link:hover,
.text-link:active,
.text-link:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
.text-link span { font-size: 16px; }

.wdd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.wdd-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wdd-button:active { transform: translateY(1px); }
.wdd-button-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.wdd-button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.wdd-button-secondary { background: var(--quiet); border-color: var(--rule); color: var(--ink); }
.wdd-button-secondary:hover { background: #ebe3dc; border-color: var(--soft-accent); }
.student-action.wdd-button { min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--rule); }

.notice-list { border-top: 0; }
.notice-item {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.notice-date {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--soft-accent);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding-top: 2px;
}
.notice-content { display: flex; flex-direction: column; align-items: flex-start; }
.notice-item h3 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.2;
}
.notice-item p {
    margin-top: 8px;
    max-width: 620px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.notice-action, .payment-action, .student-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: var(--accent);
    font-size: 12px;
    min-height: 36px;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}
.notice-action:hover,
.notice-action:active,
.payment-action:hover,
.payment-action:active,
.student-action:hover,
.student-action:active { border-color: rgba(91, 62, 92, 0.35); }
.notice-action svg, .payment-action svg, .student-action svg, .student-card-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-list { padding-top: 0; }
.student-editorial {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.student-editorial-link {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 16px;
    align-items: flex-start;
}
.student-photo {
    display: grid;
    place-items: center;
    width: 74px;
    height: 90px;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--quiet);
    color: var(--accent);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 24px;
}
.student-photo img { width: 100%; height: 100%; object-fit: cover; }
/* The picture sits on top of the initials in the same square; if it fails to load, the initials stay. */
.student-photo, .list-thumb { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.student-photo > span, .student-photo > img, .list-thumb > span, .list-thumb > img { grid-area: 1 / 1; place-self: center; }
.student-photo > img, .list-thumb > img { place-self: stretch; }
.student-editorial-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.student-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}
.student-name {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.2;
}
.student-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    color: var(--green-readable);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.student-modality,
.student-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.student-modality { margin-top: 6px; }
.student-meta { margin-top: 2px; }
.attendance-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-top: 13px;
    color: var(--muted);
    font-size: 12px;
}
.attendance-row strong { color: var(--ink); font-weight: 500; }
.attendance-bar { width: 100%; height: 4px; overflow: hidden; margin-top: 8px; background: var(--quiet); }
.attendance-bar span { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: left center; animation: attendance-fill .8s .12s cubic-bezier(.22,.7,.25,1) both; }
.student-action { margin-top: 12px; }

.mobile-list { display: flex; flex-direction: column; gap: 0; }
.list-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
    min-height: 60px;
}
.list-thumb {
    width: 64px;
    height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--quiet);
    color: var(--accent);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 20px;
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb.large { width: 76px; height: 92px; }
.list-main { display: flex; flex-direction: column; min-width: 0; }
.list-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.list-topline strong {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
}
.list-copy {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.list-chevron {
    color: var(--soft-accent);
    font-size: 28px;
    line-height: 1;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-readable);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.status-pill.payment-status.em-atraso { background: var(--warning-soft); color: var(--warning); }
.status-pill.payment-status.pago,
.status-pill.attendance-status.presente,
.status-pill.attendance-status.pago { background: var(--green-soft); color: var(--green-readable); }

.child-directory-row {
    width: 100%;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 160px;
    margin-bottom: 14px;
    padding: 20px 16px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: rgba(243, 238, 232, .52);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.child-directory-row:hover { color: var(--accent); }
.child-directory-row:active { background: var(--quiet); }
.child-directory-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.child-directory-row .list-main { min-width: 0; }
.child-class {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.3;
}
.directory-hint { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.child-directory .list-thumb { width: 76px; height: 88px; font-size: 24px; }
.child-attendance { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; }
.child-attendance .attendance-bar { flex: 1; margin-top: 0; }
.child-attendance strong { color: var(--green-readable); font-size: 12px; font-weight: 500; }
.child-card {
    margin-bottom: 18px;
    padding: 20px 16px 16px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: rgba(243, 238, 232, .52);
}
.child-card-main { display: flex; align-items: flex-start; gap: 18px; }
.child-card-main .list-thumb { flex: 0 0 80px; width: 80px; height: 92px; font-size: 26px; }
.child-card-copy { min-width: 0; flex: 1; padding-top: 2px; }
.child-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.child-card-heading h2 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 24px; line-height: 1.1; }
.child-teacher { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.child-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.child-card-actions .wdd-button { width: 100%; }
.attendance-sentence { color: var(--muted); font-size: 14px; }
.child-schedule {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.action-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 48px;
    background: rgba(28, 28, 30, .18);
    animation: reveal .2s ease both;
}
.child-action-sheet {
    width: min(100%, 560px);
    padding: 10px 20px calc(18px + env(safe-area-inset-bottom));
    background: var(--paper);
    border: 1px solid var(--rule);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(28, 28, 30, .08);
    animation: sheet-rise .24s ease both;
}
.action-sheet-backdrop.is-closing { animation: backdrop-out .24s ease both; }
.action-sheet-backdrop.is-closing .child-action-sheet { animation: sheet-drop .24s ease both; }
.action-sheet-handle {
    width: 34px;
    height: 3px;
    margin: 0 auto 22px;
    border-radius: 999px;
    background: var(--rule);
}
.action-sheet-child {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
}
.action-sheet-child h2 {
    margin-top: 5px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 26px;
    line-height: 1.1;
}
.action-sheet-child p:last-child {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}
.action-sheet-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
}
.action-sheet-button { width: 100%; }
.action-sheet-dismiss {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
}

.progress-summary {
    max-width: 640px;
    padding: 16px 0 20px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.progress-summary-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 12px;
}
.progress-summary-head strong { color: var(--ink); font-weight: 500; }
.attendance-sentence { color: var(--muted); font-size: 14px; }
.progress-back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent); font-size: 12px; }
.progress-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 44px; }
.progress-heading-row .eyebrow { flex: 0 0 auto; margin: 0; white-space: nowrap; letter-spacing: .1em; }
.progress-heading-row .progress-back-link { flex: 0 0 auto; white-space: nowrap; }
.child-progress-intro { margin-bottom: 24px; }
.child-progress-intro h1 { margin-top: 4px; font-size: 36px; line-height: 1.1; }
.child-progress-intro .progress-child-switcher { margin-top: 12px; }
.child-progress-intro .intro-copy { margin-top: 16px; color: var(--muted); font-size: 15px; }
.progress-teacher { margin-top: 2px; color: var(--soft-accent); font-size: 12px; }
.child-progress-intro .attendance-sentence { margin-top: 12px; color: var(--ink); }
.progress-child-switcher { display: flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 12px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.progress-child-switcher::-webkit-scrollbar { display: none; }
.progress-child-chip { flex: 0 0 auto; min-width: 76px; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.progress-switcher-label { flex: 0 0 auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.class-record-list { opacity: 1; transition: opacity 140ms ease; }
.class-record-list.switching { opacity: 0; }
.class-month-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.class-month-heading-row .class-month-heading { margin: 0; color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.class-month-heading-row .stars-explanation-wrap { position: relative; max-width: none; margin: 0; }
.class-month-heading-row .stars-explanation-toggle { min-height: 44px; padding: 12px 0; white-space: nowrap; }
.class-month-heading-row .stars-explanation { position: absolute; z-index: 2; top: 48px; right: 0; width: min(360px, calc(100vw - 40px)); margin: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--quiet); box-shadow: none; }
.class-record-list > .class-month-heading-row:first-child { margin-top: 0; }
.compact-record { min-height: 48px; margin-bottom: 12px; padding: 12px 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.compact-record .class-record-header h3 { font-size: 22px; }
.compact-record .class-record-header p { margin-top: 0; }
.compact-record .class-teacher { display: none; }
.class-record-name { margin-top: 5px !important; color: var(--muted); font-size: 12px; }
.rating-label { min-width: 100px; color: var(--muted); font-size: 14px; }
.rating-unrated { color: #a6a09d; font-size: 13px; font-weight: 400; }

.payments-intro { margin-bottom: 24px; }
.payments-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 640px;
    margin-bottom: 32px;
    padding: 20px 20px 18px;
    border-radius: 16px;
    background: rgba(243,238,232,.5);
    box-shadow: 0 1px 8px rgba(28,28,30,.035);
}
.payments-summary-label { color: var(--muted); font-size: 13px; }
.payments-summary-amount {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
}
.payments-summary-meta { color: var(--muted); font-size: 13px; }
.payments-summary-good { color: var(--green-readable); font-size: 15px; }
.payments-summary-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.payments-section-label {
    margin: 28px 0 4px;
    color: var(--accent);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.payments-row-list { max-width: 640px; }
.payments-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    color: inherit;
}
.payments-row:hover { color: var(--accent); }
.payments-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.payments-row-main strong { font-size: 16px; font-weight: 500; }
.payments-row-sub { color: var(--muted); font-size: 13px; }
.payments-row-amount {
    flex: 0 0 auto;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    font-weight: 400;
}
.payment-status-text.pendente { color: var(--muted); }
.payments-show-more {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 6px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.payment-detail-intro { margin-bottom: 20px; }
.payment-detail-type-line { margin-top: 12px; color: var(--muted); font-size: 13px; }
.payment-detail-amount-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    max-width: 640px;
    margin-bottom: 8px;
}
.payment-detail-amount-row strong {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
}
.stars-explanation.payment-howto-panel { max-width: 640px; margin-top: 8px; border-left: 0; border-radius: 10px; background: var(--quiet); }
.payment-howto-title { margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.payment-howto-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid var(--rule);
}
.payment-howto-label { color: var(--muted); font-size: 12px; }
.payment-howto-value { max-width: 100%; font-size: clamp(12px, 3.6vw, 14px); font-weight: 500; white-space: nowrap; }
.payment-detail-amount-row .payment-status-text { font-size: 14px; font-weight: 500; line-height: 1.2; }
.payment-detail-amount-row .payment-status-text.pendente { color: var(--muted); }
.payment-detail-amount-row .payment-status-text.em-atraso { color: var(--warning); }
.payment-detail-amount-row .payment-status-text.pago { color: #4f5f37; }
.payment-howto-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.copy-button { min-width: 96px; min-height: 44px; }
.payment-paid-facts { max-width: 640px; margin-top: 8px; }
.payment-paid-facts > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--rule);
}
.payment-paid-facts dt { color: var(--muted); font-size: 14px; }
.payment-paid-facts dd { margin: 0; font-size: 14px; }
.invoice-download { display: inline-flex; margin-top: 4px; }
.invoice-number-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.invoice-pending-hint { margin-top: 8px; color: var(--soft-accent); font-size: 14px; }
.class-observations-wrap { margin-top: 18px; }
.class-observations { margin-top: 0; color: var(--ink); font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 16px; line-height: 1.45; }
.note-paragraph { display: block; }
.note-paragraph + .note-paragraph { margin-top: 8px; }
.class-observations.collapsed { -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%); }
.note-toggle { display: block; min-height: 44px; margin-top: 8px; padding: 12px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.stars-explanation-wrap { max-width: 640px; margin-top: 14px; }
.stars-explanation-toggle,
.stars-explanation-close {
    min-height: 44px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.stars-explanation-toggle { text-decoration: underline; text-decoration-color: rgba(91,62,92,.3); text-underline-offset: 4px; }
.stars-explanation-toggle:focus-visible,
.stars-explanation-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.stars-explanation {
    margin-top: 6px;
    padding: 18px 18px 14px;
    border-left: 2px solid var(--accent);
    background: rgba(243,238,232,.5);
    animation: reveal .24s ease both;
}
.stars-explanation h2 {
    margin-bottom: 12px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.15;
}
.stars-explanation p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.stars-explanation p strong { color: var(--ink); font-weight: 500; }
.class-record-list { max-width: 640px; margin-top: -19px; scroll-margin-top: 56px; }
.class-month-heading {
    margin: 30px 0 12px;
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
}
.class-month-heading:first-child { margin-top: 0; }
.class-record-card {
    margin-bottom: 14px;
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: rgba(243,238,232,.5);
    box-shadow: 0 1px 8px rgba(28,28,30,.035);
    animation: reveal .3s calc(var(--record-index) * 60ms) ease both;
}
.class-record-toggle { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; gap: 14px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.class-record-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.record-chevron { flex: 0 0 auto; color: var(--accent); font-size: 22px; line-height: 1; transform: rotate(0deg); transition: transform .18s ease; }
.expandable-record.is-open .record-chevron { transform: rotate(180deg); }
.class-record-details { margin-top: 12px; animation: reveal .18s ease both; }
.class-record-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.class-record-main { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; row-gap: 5px; min-width: 0; }
.class-record-header h3 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1;
}
.class-record-date { flex: 0 0 auto; white-space: nowrap; }
.class-record-header p { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.class-record-header .class-record-name { flex: 0 1 auto; min-width: 0; white-space: normal; }
.attendance-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 10px; letter-spacing: .04em; }
.attendance-pill.present { background: var(--green-soft); color: var(--green-readable); }
.attendance-pill.absent { background: rgba(98,91,88,.1); color: var(--muted); }
.rating-list { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--rule); }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rating-label { color: var(--muted); font-size: 12px; }
.rating-stars { display: inline-flex; gap: 3px; color: transparent; font-size: 16px; line-height: 1; }
.rating-star { color: transparent; -webkit-text-stroke: 1px var(--soft-accent); }
.rating-star.filled { color: var(--accent); -webkit-text-stroke: 1px var(--accent); }
.class-observations { margin-top: 18px; padding-left: 13px; border-left: 2px solid var(--green); color: var(--muted); font-size: 14px; line-height: 1.7; }
.note-paragraph { display: block; }
.note-paragraph + .note-paragraph { margin-top: 8px; }
.class-teacher { margin-top: 18px; color: var(--soft-accent); font-size: 11px; }
.class-empty-state { color: var(--muted); font-size: 14px; }
.load-more-classes { display: flex; width: min(100%, 640px); margin: 24px auto 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.progress-section { max-width: 640px; margin-top: 34px; }
.progress-section-heading { margin-bottom: 6px; }
.progress-section-heading h2 {
    margin-top: 7px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 28px;
    line-height: 1.1;
}
.child-progress-intro { margin-bottom: 24px; }
.materials-intro { margin-bottom: 28px; }
.materials-empty {
    max-width: 560px;
    padding: 24px 0;
    border-top: 1px solid var(--rule);
}
.materials-empty h2 {
    margin-top: 14px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 30px;
    line-height: 1.12;
}
.materials-empty p:last-child {
    max-width: 420px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.65;
}

.material-list { max-width: 640px; }
.material-item { padding: 22px 0 24px; border-top: 1px solid var(--rule); }
.material-item:last-child { border-bottom: 1px solid var(--rule); }
.material-type { margin-bottom: 8px; color: var(--green-readable); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.material-item h2 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.material-text { max-width: 560px; margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.material-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; }
.material-actions .wdd-button { width: 100%; min-height: 48px; }
.material-host { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.material-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.material-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--quiet); }
@media (min-width: 560px) {
    .material-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
    .material-actions .wdd-button { width: auto; min-width: 200px; }
    .material-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.detail-panel {
    margin-top: 18px;
    padding: 22px 0 0;
    border-top: 1px solid var(--rule);
}
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.detail-header h2 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 30px;
    line-height: 1.1;
}
.detail-copy {
    color: var(--muted);
    margin-top: 6px;
    font-size: 13px;
}
.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.detail-meta strong {
    font-size: 14px;
    font-weight: 500;
}
.detail-progress { padding: 18px 0 12px; }
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 4px;
}
.solid-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0 4px;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.solid-link:hover, .solid-link:active, .solid-link:focus-visible { border-color: rgba(91,62,92,.35); }

.evaluation-row {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.evaluation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.evaluation-term {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.score {
    color: var(--accent);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 28px;
    line-height: 1;
}
.score small {
    color: var(--muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    margin-left: 2px;
}
.evaluation-row h2 {
    margin-top: 12px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 28px;
    line-height: 1.12;
}
.evaluation-row h3 {
    margin-top: 6px;
    color: var(--soft-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.evaluation-row p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.payment-list { margin-top: 18px; }
.payment-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 24px;
    padding: 18px 0 16px;
    border-bottom: 1px solid var(--rule);
    transition: color .18s ease;
}
.payment-row:hover { color: var(--accent); }
.payment-row-copy,
.payment-row-value,
.payment-row-foot { display: flex; }
.payment-row-copy { min-width: 0; flex-direction: column; gap: 4px; }
.payment-row-copy strong { font-size: 17px; font-weight: 500; line-height: 1.25; }
.payment-class { color: var(--muted); font-size: 13px; line-height: 1.4; }
.payment-row-value { align-items: flex-end; flex-direction: column; gap: 5px; }
.payment-amount {
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 27px;
    line-height: 1;
}
.payment-status-text { color: var(--muted); font-size: 11px; line-height: 1.2; }
.payment-status-text.em-atraso { color: var(--warning); }
.payment-status-text.pago { color: var(--green-readable); }
.payment-row-foot {
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    color: var(--soft-accent);
    font-size: 11px;
    letter-spacing: .04em;
}
.payment-row-foot .payment-status-text { font-size: inherit; }
.payment-chevron { color: var(--accent); font-size: 26px; line-height: .7; }
.home-payment-list { margin-top: 2px; }
.payment-history-list { margin-top: 4px; }
.payment-detail-intro { margin-bottom: 24px; }
.back-link {
    display: inline-flex;
    margin-bottom: 26px;
    color: var(--accent);
    font-size: 12px;
}
.payment-detail { max-width: 640px; border-top: 2px solid var(--accent); }
.payment-detail-amount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}
.payment-detail-amount span,
.payment-detail-facts dt {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.payment-detail-amount strong {
    color: var(--accent);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1;
}
.payment-detail-facts { margin: 0; }
.payment-detail-facts > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}
.payment-detail-facts dd { margin: 0; font-size: 14px; }
.payment-reference-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 12px !important; }

.page-intro.list-intro { margin-bottom: 24px; padding-bottom: 0; }
.page-intro.list-intro h1 { margin-bottom: 0; }
.notices-intro h1,
.page-intro.notices-intro h1 { font-size: 36px; }
.notice-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    max-width: 640px;
    margin-bottom: 8px;
    padding: 2px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.notice-filters::-webkit-scrollbar { display: none; }
.notice-filter {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}
.notice-filter[aria-pressed="true"] { background: var(--accent); color: var(--quiet); }
.notice-filter:active { background: rgba(91,62,92,.12); transition: none; }
.notice-filter[aria-pressed="true"]:active { background: var(--accent-hover); }
.notice-empty { max-width: 640px; padding: 16px 0; color: var(--muted); font-size: 15px; }
.notice-rows { animation: notice-fade .18s ease both; }
@keyframes notice-fade { from { opacity: 0; } to { opacity: 1; } }
.notice-rows { max-width: 640px; margin: 0; padding: 0; list-style: none; }
.notice-row-item { border-bottom: 1px solid var(--rule); }
.notice-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: calc(100% + 20px);
    min-height: 64px;
    margin: 0 -10px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
}
button.notice-row { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
button.notice-row:active { background: var(--quiet); }
.notice-row-meta { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.notice-row-date { color: var(--muted); font-size: 13px; line-height: 1.4; }
.new-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(91,62,92,.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.notice-row-titleline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notice-row-title {
    min-width: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.2;
}
.notice-chevron {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}
.notice-chevron.open { transform: rotate(180deg); }
.notice-body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows .18s ease, opacity .18s ease, visibility 0s .18s;
}
.notice-body.open { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.notice-body-clip { min-height: 0; overflow: hidden; }
.notice-body-text { padding-bottom: 18px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.notice-body-text p + p { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) {
    .notice-body, .notice-chevron, button.notice-row { transition: none; }
    .notice-rows { animation: none; }
}

a, button, .wdd-button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button.notice-row:active, .latest-notice-link:active { transition: none; }
.wdd-button-primary:active { background: var(--accent-hover); border-color: var(--accent-hover); }
.wdd-button-secondary:active { background: #e3dad2; border-color: var(--soft-accent); }
.text-link:active { opacity: .55; }
.payments-row:active { background: var(--quiet); }

.attendance-row-entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.attendance-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.attendance-entry-top strong {
    font-size: 17px;
    font-weight: 500;
}
.attendance-entry-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.portal-footer { display: flex; flex-direction: column; gap: 5px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--soft-accent); font-size: 10px; letter-spacing: .04em; line-height: 1.4; }
.portal-footer strong { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 500; }
.legal-footer { display: flex; justify-content: center; padding: 10px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.legal-footer a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 11px; }
.legal-footer a:hover, .legal-footer a:focus-visible { color: var(--accent); }
.legal-document { max-width: 760px; }
.legal-document h1 { margin: 14px 0 30px; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: clamp(32px, 5vw, 46px); font-weight: 400; line-height: 1.1; }
.legal-document-section { padding: 22px 0; border-top: 1px solid var(--rule); }
.legal-document-section h2 { margin-bottom: 10px; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 23px; font-weight: 400; }
.legal-document-section p { margin-top: 9px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.legal-association-details { margin: 0; border-top: 1px solid var(--rule); }
.legal-association-details > div { display: grid; grid-template-columns: minmax(115px, .4fr) minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.legal-association-details dt { color: var(--muted); font-size: 13px; }
.legal-association-details dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }

.page-topline { gap: 6px; }
.page-topline .eyebrow { flex: 0 0 auto; white-space: nowrap; letter-spacing: .1em; }
.page-topline-link { flex: 0 0 auto; white-space: nowrap; }
.section-heading { gap: 10px; }
.section-heading > div { flex: 1 1 auto; min-width: 0; }
.section-heading h2 { overflow-wrap: break-word; }
.section-heading > .text-link { flex: 0 0 auto; white-space: nowrap; }
.pay-help-terms, .pay-transfer-link { display: flex; min-height: 44px; align-items: center; }
.pay-acceptance { min-height: 44px; }
.pay-acceptance a { display: inline-flex; min-height: 44px; align-items: center; }
.pay-acceptance a { text-decoration: underline; text-underline-offset: 3px; }
.pay-transfer-link { margin-top: 2px; text-decoration: underline; text-underline-offset: 3px; }

.home-notices .notice-item p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-intro h1[tabindex="-1"]:focus {
    outline: none;
    box-shadow: none;
}

@media (min-width: 900px) {
    .portal-main { max-width: 980px; padding-left: 32px; padding-right: 32px; }
    .next-class { max-width: 960px; }
    .next-class {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr);
        column-gap: 36px;
        align-items: end;
    }
    .next-class > .eyebrow { grid-column: 1 / -1; }
    .next-class-schedule { grid-column: 1 / -1; grid-row: 2; }
    .next-class-context { grid-column: 1; grid-row: 3; }
    .next-class-teacher { grid-column: 2; grid-row: 3; margin-top: 24px; }
    .notice-list, .payment-list, .student-list { max-width: 960px; }
}

@media (max-width: 767px) {
    html, body { background: #fff; }
    .portal-header { height: 86px; padding: 6px 20px 0; background: #fff; }
    .brand { height: 48px; }
    .brand-logo { height: 60px; }
    .header-context { display: none; }
    .profile-link { width: 44px; height: 44px; }
    .portal-body { display: block; min-height: 0; }
    .portal-nav { display: none; }
    .portal-main { width: 100%; max-width: 430px; margin: 0 auto; padding: 24px 20px calc(140px + env(safe-area-inset-bottom)); background: #fff; }
    .page-intro { margin-bottom: 28px; }
    .page-intro h1 { font-size: 40px; }
    .next-class { padding: 22px 20px 24px; }
    .next-class h2 { font-size: 27px; }
    .next-class-context h2 { font-size: 23px; }
    .next-class-context h2 { font-size: 26px; }
    .section-heading { gap: 12px; }
    .section-heading h2 { font-size: 25px; }
    .notice-item { grid-template-columns: 1fr; gap: 10px; }
    .student-editorial-link { grid-template-columns: 68px minmax(0, 1fr); }
    .student-photo { width: 68px; height: 84px; }
    .student-name { font-size: 19px; }
    .student-modality, .student-meta { font-size: 12px; }
    .student-topline { align-items: flex-start; }
    .payment-row { gap: 5px 14px; }
    .payment-detail-facts > div { grid-template-columns: 92px minmax(0, 1fr); }
    .mobile-nav { display: grid; }
    .invoice-download { width: 100%; }
    .legal-footer { margin-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; z-index: 100; background: var(--accent); color: white; padding: 12px 20px; }
#blazor-error-ui .reload { text-decoration: underline; margin-left: 10px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet-drop { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(16px); } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes attendance-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes login-symbol-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes login-motto-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .login-symbol, .login-motto { animation: none; }
}

.account-intro { margin-bottom: 24px; padding-bottom: 0; }
.account-intro-row { display: flex; align-items: flex-start; justify-content: space-between; min-height: 44px; }
.account-intro-row .eyebrow { margin: 0; }
.account-home-link { display: inline-flex; min-height: 44px; align-items: center; padding: 0 12px; color: var(--accent); font-size: 14px; }
.account-intro h1 { margin-bottom: 0; font-size: 36px; }
.account-layout { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.account-section-list { margin: 0; padding: 0; list-style: none; }
.account-section-list li { border-bottom: 1px solid var(--rule); }
.account-section-link { display: flex; min-height: 56px; align-items: center; padding: 8px 0; color: var(--ink); font-size: 14px; line-height: 1.35; }
.account-section-link.active { color: var(--accent); font-weight: 600; }
.account-content { min-width: 0; max-width: 680px; }
.account-page-title { margin: 0 0 18px; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 24px; line-height: 1.2; }
.account-form-wrap { width: min(100%, 520px); }
.account-form { display: flex; flex-direction: column; gap: 16px; }
.account-field { display: flex; flex-direction: column; gap: 7px; }
.account-field > label, .account-content .form-label { color: var(--ink); font-size: 14px; }
.account-content input:not([type="checkbox"]), .account-content select, .account-content textarea {
    width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 12px;
    background: var(--quiet); color: var(--ink); font: inherit; font-size: 16px;
}
.account-content input:disabled { color: var(--muted); opacity: 1; }
.account-content .form-floating { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.account-content .form-floating > .form-control { height: 48px; min-height: 48px; padding: 10px 14px; font-size: 16px; }
.account-content .form-floating > label { position: static; height: auto; padding: 0; transform: none; opacity: 1; font-size: 14px; }
.account-content .form-floating > .form-control:focus ~ label,
.account-content .form-floating > .form-control:not(:placeholder-shown) ~ label { transform: none; }
.account-content .form-floating > .form-control { order: 2; }
.account-content .form-floating > label { order: 1; }
.account-content .form-floating > .text-danger { order: 3; }
.account-content .text-danger, .account-content .validation-message { display: block; margin-top: 5px; color: var(--warning) !important; font-size: 14px; line-height: 1.4; }
.account-submit { width: 100%; min-height: 48px; }
.account-content .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; background: var(--accent); border-color: var(--accent); color: #fff; font-size: 14px; text-decoration: none; }
.account-content .btn-danger { background: var(--warning); border-color: var(--warning); }
.account-content h3, .account-content h4 { margin: 0 0 16px; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-weight: 400; }
.account-content .alert-success { border: 0; background: var(--green-soft); color: var(--green-readable); font-size: 14px; }
.account-content .alert-danger, .account-content .alert-warning { border: 0; background: var(--warning-soft); color: var(--warning); font-size: 14px; }
.account-content p { margin: 0 0 14px; line-height: 1.6; }
.account-content .table { width: 100%; }
.account-content .table td { padding: 12px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.page-intro.list-intro { margin-bottom: 24px; padding-bottom: 0; }
.page-intro.list-intro h1 { margin-bottom: 0; }
.page-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 44px; }
.page-topline .eyebrow { flex: 0 0 auto; margin: 0; white-space: nowrap; letter-spacing: .1em; }
.page-topline-link { display: inline-flex; flex: 0 0 auto; min-height: 44px; align-items: center; color: var(--accent); font-size: 14px; white-space: nowrap; }
.materials-intro .page-topline { margin-bottom: 4px; }
.error-page { max-width: 600px; }
.error-page h1 { margin-bottom: 14px; font: 400 36px/1.1 "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; }
.error-page p { margin-bottom: 20px; color: var(--muted); line-height: 1.6; }
.error-home-link { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 22px; border-radius: 999px; background: var(--accent); color: white; }
.account-route-topline { margin-bottom: 8px; }
.account-route-body { min-width: 0; }
.account-route-body > h1, .account-route-body h1:not(.login-front-door h1) {
    margin: 0 0 24px;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.1;
}
.account-route-body h2, .account-route-body h3 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-weight: 400; }
.account-route-body .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.account-route-body .form-floating { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.account-route-body .form-floating > .form-control { height: 48px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--quiet); color: var(--ink); font-size: 16px; }
.account-route-body .form-floating > label { position: static; height: auto; padding: 0; transform: none; opacity: 1; color: var(--ink); font-size: 14px; }
.account-route-body .form-floating > .form-control:focus ~ label,
.account-route-body .form-floating > .form-control:not(:placeholder-shown) ~ label { transform: none; }
.account-route-body .form-floating > .form-control { order: 2; }
.account-route-body .form-floating > label { order: 1; }
.account-route-body .form-floating > .text-danger { order: 3; }
.account-route-body .form-control { max-width: 520px; }
.account-route-body .btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: white; font-size: 14px; text-decoration: none; }
.account-route-body .btn-link { min-height: 44px; border: 0; background: transparent; color: var(--accent); }
.account-route-body .text-danger { color: var(--warning) !important; font-size: 14px; }
.login-topline { width: 100%; max-width: 760px; margin-bottom: auto; }
.login-front-door .login-topline + .login-symbol { margin-top: 26px; }
.login-title { margin-top: 18px; color: var(--paper); font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 36px; line-height: 1.1; }
.error-technical { color: var(--muted); font-size: 12px; }
@media (max-width: 767px) {
    .account-layout { grid-template-columns: 1fr; gap: 24px; }
    .account-section-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
    .account-intro h1 { font-size: 36px; }
    .account-route-body > h1, .account-route-body h1:not(.login-front-door h1) { font-size: 32px; }
    .account-route-body .row { display: block; }
    .account-route-body .col-lg-6, .account-route-body .col-xl-6, .account-route-body .col-md-6 { width: 100%; }
    .login-topline { max-width: 100%; }
}

@media (max-width: 640px) {
    .page-topline, .progress-heading-row { gap: 6px; }
    .page-topline .eyebrow, .progress-heading-row .eyebrow { letter-spacing: .08em; font-size: 9px; }
    .page-topline-link, .progress-back-link { font-size: 13px; }
    .section-heading { align-items: flex-start; gap: 8px; }
    .section-heading > div { min-width: 0; }
    .section-heading > .text-link { align-self: flex-start; }
    .class-record-header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .class-record-main { column-gap: 8px; row-gap: 6px; }
    .class-record-date { white-space: nowrap; }
    .class-record-schedule { white-space: nowrap; }
    .attendance-pill.absent { justify-self: end; white-space: nowrap; }
}

/* Pagar agora */
.pay-now-button { width: 100%; margin-top: 12px; }
.payment-waiting-line { margin-top: 6px; color: var(--muted); font-size: 13px; }
.payment-waiting-inline { color: var(--muted); }
.payment-transfer { max-width: 640px; }
.payment-transfer-toggle {
    display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0; border: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
    background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.payment-transfer-toggle:active { background: var(--quiet); }
.payment-transfer .notice-body-clip { padding-top: 10px; }
.pay-intro { max-width: 640px; }
.page-intro.pay-intro h1 { margin-bottom: 8px; font-size: 36px; }
.pay-subtitle { color: var(--muted); font-size: 13px; }
.pay-body { max-width: 640px; }
.pay-methods { margin-bottom: 20px; }
.pay-form { display: flex; flex-direction: column; gap: 16px; }
.pay-field { display: flex; flex-direction: column; gap: 7px; }
.pay-field label { font-size: 14px; }
.pay-input {
    width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 12px;
    background: var(--quiet); color: var(--ink); font: inherit; font-size: 16px;
}
.pay-input.invalid { border-color: var(--warning); }
.pay-help { color: var(--muted); font-size: 13px; line-height: 1.5; }
.pay-error { color: var(--warning); font-size: 14px; line-height: 1.5; }
.pay-failure { margin-top: 16px; }
.pay-button { width: 100%; }
.pay-button:disabled, .pay-copy:disabled { opacity: .6; cursor: default; }
.pay-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pay-state-title { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 22px; line-height: 1.25; }
.pay-success-title { color: var(--green-readable); font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; font-size: 26px; font-weight: 400; line-height: 1.2; }
.pay-countdown { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pay-text-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pay-text-button {
    display: inline-flex; min-height: 44px; align-items: center; padding: 0; border: 0; background: transparent;
    color: var(--accent); font: inherit; font-size: 14px; cursor: pointer;
}
.pay-text-button:active { opacity: .55; }
.pay-reference { padding-top: 14px; }
.pay-example-tag { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.pay-ref-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.pay-ref-row:first-of-type { border-top: 0; }
.pay-ref-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pay-ref-label { color: var(--muted); font-size: 12px; }
.pay-ref-value { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pay-copy { flex: 0 0 auto; min-width: 96px; min-height: 48px; border-color: var(--accent); background: transparent; color: var(--accent); }
.pay-copy:hover { background: rgba(91,62,92,.06); }
.pay-copy:active { background: rgba(91,62,92,.12); }
.pay-copy-all { margin-top: 4px; }
.pay-valid-until { margin-top: 12px; }
.pay-note { margin-top: 8px; font-size: 14px; line-height: 1.6; }
.pay-dev-strip { max-width: 640px; margin-top: 40px; padding: 12px 14px; border: 1px dashed var(--soft-accent); border-radius: 10px; }
.pay-dev-label { color: var(--muted); font-size: 12px; }
.development-reset { margin-top: 12px; }
.development-reset-link { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
@media (min-width: 768px) {
    .pay-now-button, .pay-button { width: auto; min-width: 240px; }
}

/* Login with an emailed code, and the account menu */
.portal-body.signed-out { display: block; }
.portal-body.signed-out .portal-main { max-width: 640px; margin: 0 auto; }
.login-card { max-width: 520px; }
.login-card .account-field { gap: 8px; }
.login-code-input { max-width: 240px; font-size: 24px !important; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; }
.login-message { color: var(--ink); }
.login-error { margin: 0; color: var(--warning); font-size: 14px; line-height: 1.4; }
.login-error-box { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: var(--warning-soft); }
.login-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 12px; }
.login-secondary form { display: inline; }
.login-link { display: inline-flex; min-height: 48px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.login-help { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.login-help-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu-panel { position: absolute; right: 0; top: 50px; z-index: 30; min-width: 160px; padding: 6px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); box-shadow: 0 8px 24px rgba(28, 28, 30, .08); }
.account-menu-item { display: flex; width: 100%; min-height: 48px; align-items: center; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.account-menu-item:hover { background: var(--quiet); }
