:root {
    --bg: #f3ede4;
    --bg-strong: #e7ddd0;
    --panel: rgba(255, 251, 246, 0.92);
    --panel-strong: #fffaf4;
    --text: #241f1a;
    --muted: #6e6256;
    --line: rgba(36, 31, 26, 0.08);
    --primary: #b95c37;
    --primary-deep: #964425;
    --secondary: #1f5f5b;
    --focus-ring: rgba(31, 95, 91, 0.42);
    --shadow: 0 24px 60px rgba(74, 52, 33, 0.13);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --content-width: 1180px;
    --font-body: "Trebuchet MS", "Segoe UI", sans-serif;
    --font-title: Georgia, "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(250, 247, 241, 0.7), rgba(239, 232, 222, 0.82)),
        image-set(
            url("../images/photo-order-background-v1.avif") type("image/avif"),
            url("../images/photo-order-background-v1.webp") type("image/webp")
        );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
}

@media (max-width: 700px) {
    body {
        background-position: center top;
        background-attachment: scroll;
    }
}

body.stage-builder {
    --content-width: 1680px;
}

body.stage-builder .page-shell {
    width: min(calc(100% - 48px), var(--content-width));
}

body.stage-checkout,
body.stage-history {
    --content-width: 1680px;
}

body.stage-checkout .page-shell,
body.stage-history .page-shell {
    width: min(calc(100% - 48px), var(--content-width));
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 200;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #d99a69, var(--secondary));
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
}

body.is-navigating::before {
    opacity: 1;
    animation: pageNavigationProgress 1.4s ease-out both;
}

@keyframes pageNavigationProgress {
    0% { transform: scaleX(0); }
    45% { transform: scaleX(0.72); }
    100% { transform: scaleX(0.94); }
}

body.modal-open {
    overflow: hidden;
}

body.cart-addon-open {
    overflow: hidden;
}

.checkout-layout {
    transition: opacity 0.16s ease;
}

.checkout-layout.is-updating {
    opacity: 0.62;
    pointer-events: none;
}

.checkout-layout.checkout-content-updated > * {
    animation: checkoutContentUpdated 0.28s ease-out both;
}

@keyframes checkoutContentUpdated {
    from {
        opacity: 0.7;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-empty-state,
.checkout-empty-side {
    display: grid;
    justify-items: start;
    gap: 12px;
}

.checkout-empty-state {
    padding: 18px 0 6px;
}

.checkout-empty-state h2,
.checkout-empty-state p,
.checkout-empty-side p {
    margin: 0;
}

.icon-button.is-submitting,
.link-button.is-submitting {
    opacity: 0.48;
}

body[data-protected-media="1"] [data-protected-surface] {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

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

.brand-link:focus-visible,
.nav-link:focus-visible,
.nav-link-button:focus-visible,
.quick-link:focus-visible,
.mobile-nav-link:focus-visible,
.linked-access-card:focus-visible,
.history-link:focus-visible,
.school-thumb:focus-visible,
.auth-helper-link:focus-visible,
.notfound-link:focus-visible,
.btn:focus-visible,
.icon-button:focus-visible,
.link-button:focus-visible,
.preview-close:focus-visible,
.product-card-visual:focus-visible,
.compact-cart-action:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

button,
input {
    font: inherit;
}

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

.page-shell {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
    padding: 24px 0 48px;
    position: relative;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.24;
    pointer-events: none;
}

.orb-a {
    top: 90px;
    left: 4vw;
    width: 220px;
    height: 220px;
    background: rgba(236, 183, 122, 0.26);
}

.orb-b {
    right: 4vw;
    bottom: 70px;
    width: 280px;
    height: 280px;
    background: rgba(97, 147, 142, 0.18);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #d48862);
    color: #fffaf5;
    box-shadow: 0 10px 24px rgba(185, 92, 55, 0.28);
}

.brand-mark-placeholder {
    flex: 0 0 auto;
    overflow: hidden;
}

.brand-mark-logo {
    flex: 0 0 auto;
    overflow: hidden;
    padding: 4px;
    border: 1px solid rgba(17, 58, 63, 0.14);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 58, 63, 0.14);
}

.brand-monogram {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-title);
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.top-nav {
    display: inline-flex;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.7);
    border: 1px solid rgba(36, 31, 26, 0.06);
    backdrop-filter: blur(8px);
}

.nav-link,
.nav-link-button,
.quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link-button:hover,
.quick-link:hover {
    background: rgba(36, 31, 26, 0.06);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-link.is-active {
    background: var(--text);
    color: #fffaf5;
}

.nav-link-soft {
    background: rgba(36, 31, 26, 0.04);
}

.nav-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.09);
    font-size: 0.82rem;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 250, 244, 0.88);
    border: 1px solid rgba(36, 31, 26, 0.06);
    box-shadow: 0 10px 30px rgba(74, 52, 33, 0.08);
}

.message.success {
    border-color: rgba(31, 95, 91, 0.2);
}

.message.error {
    border-color: rgba(185, 92, 55, 0.28);
}

.main-shell {
    display: grid;
    gap: 24px;
}

.main-centered {
    min-height: calc(100vh - 170px);
    align-content: center;
}

body.stage-focused-auth .page-shell {
    width: min(calc(100% - 32px), 1320px);
    min-height: 100vh;
    padding-top: 32px;
}

body.stage-focused-auth .main-centered {
    min-height: calc(100vh - 150px);
}

body.stage-recovery .main-centered {
    align-content: start;
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-shell {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 520px);
    padding: 42px 34px;
    border-color: rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(145deg, rgba(255, 253, 249, 0.98), rgba(255, 248, 240, 0.9));
    box-shadow:
        0 26px 70px rgba(74, 52, 33, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.78) inset;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #d99a69, var(--secondary));
}

.auth-card-focused {
    width: min(100%, 760px);
}

.auth-card-add-access {
    width: min(100%, 760px);
}

.auth-card-wide {
    width: min(100%, 760px);
}

.recovery-card {
    margin: 20px 0;
}

.invoice-recipient-card {
    width: min(100%, 680px);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 700;
}

.auth-brand .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.auth-card h1,
.page-head h1,
.checkout-panel h1,
.history-list h1,
.confirmation-panel h1,
.notfound-copy h1 {
    margin: 0 0 20px;
    font-family: var(--font-title);
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-card-head h1 {
    margin-bottom: 12px;
}

.auth-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.auth-intro {
    max-width: 56ch;
    margin: -8px 0 24px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-card-head .auth-intro {
    margin: 0;
}

@media (min-width: 760px) {
    .auth-card-focused h1,
    .auth-card-focused .auth-intro,
    .auth-card-add-access .auth-intro {
        max-width: none;
        white-space: nowrap;
    }
}

.stack-form {
    display: grid;
    gap: 14px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.field-group {
    display: grid;
    align-content: start;
    gap: 8px;
}

.field-label {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 800;
}

.auth-field-wide {
    grid-column: 1 / -1;
}

.auth-field-span-4 {
    grid-column: span 4;
}

.auth-field-span-2 {
    grid-column: span 2;
}

.auth-helper {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.auth-helper-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.auth-divider {
    height: 1px;
    margin: 22px 0;
    background: rgba(36, 31, 26, 0.08);
}

.auth-confirmation {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: 10px 2px 2px;
}

.auth-confirmation-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border-radius: 18px;
    background: rgba(31, 95, 91, 0.12);
    color: var(--secondary);
    font-size: 1.7rem;
    font-weight: 900;
}

.auth-confirmation h1,
.auth-confirmation p {
    margin: 0;
}

.auth-confirmation > p:not(.auth-kicker) {
    color: var(--muted);
    line-height: 1.65;
}

.auth-confirmation .btn {
    margin-top: 8px;
}

.stage-password:not(.stage-focused-auth) .auth-helper {
    display: none;
}

input[type="password"],
input[type="email"],
input[type="number"],
input[type="text"],
textarea,
select {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(36, 31, 26, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    padding: 16px 18px;
    resize: vertical;
}

input:focus {
    border-color: rgba(185, 92, 55, 0.42);
    box-shadow: 0 0 0 4px rgba(185, 92, 55, 0.12);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 104px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: rgba(31, 95, 91, 0.1);
    color: var(--primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: rgba(31, 95, 91, 0.17);
}

textarea:focus,
select:focus {
    border-color: rgba(185, 92, 55, 0.42);
    box-shadow: 0 0 0 4px rgba(185, 92, 55, 0.12);
}

.field-error {
    margin: -4px 0 0;
    color: #a44321;
    font-size: 0.95rem;
}

.field-group .field-error {
    margin: 0;
}

.notfound-shell {
    display: flex;
    justify-content: center;
    padding: 28px 0;
}

.notfound-card {
    width: min(100%, 820px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 24px;
    padding: 24px 28px;
}

.notfound-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 3px solid #cf7a18;
    color: #cf7a18;
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
}

.notfound-copy {
    display: grid;
    gap: 10px;
    align-content: start;
}

.notfound-copy h1 {
    margin-bottom: 0;
}

.notfound-kicker {
    margin: 0;
    color: #cf7a18;
    font-weight: 700;
    font-size: 1.25rem;
}

.notfound-text {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.7;
}

.notfound-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    color: #0d5db8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.notfound-link::before {
    content: ">";
    color: var(--primary);
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.checkout-payment-form .btn:disabled {
    cursor: not-allowed;
}

.checkout-billing-field {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(36, 31, 26, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.checkout-billing-label,
.invoice-gate-form > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.invoice-required-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, white);
    color: var(--primary-deep);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.invoice-gate-open {
    overflow: hidden;
}

.invoice-gate {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 24px;
}

.invoice-gate[hidden] {
    display: none;
}

.invoice-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 28, 24, 0.62);
    backdrop-filter: blur(8px);
}

.invoice-gate-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0, rgba(31, 95, 91, 0.13), transparent 38%),
        #fffaf5;
    box-shadow: 0 30px 80px rgba(22, 18, 15, 0.28);
}

.invoice-gate-heading {
    display: grid;
    gap: 9px;
    margin-bottom: 24px;
}

.invoice-gate-kicker {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.invoice-gate-heading h2 {
    max-width: 420px;
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.55rem);
    line-height: 0.98;
}

.invoice-gate-heading p,
.invoice-gate-issuer {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.invoice-gate-form > label {
    font-size: 0.88rem;
    font-weight: 800;
}

.invoice-gate-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid rgba(49, 41, 34, 0.16);
    border-radius: 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    box-shadow: inset 0 1px 2px rgba(30, 25, 20, 0.04);
}

.invoice-gate-form input:focus {
    border-color: var(--primary);
    outline: 3px solid color-mix(in srgb, var(--primary) 18%, transparent);
    outline-offset: 1px;
}

.invoice-gate-issuer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 8px;
    font-size: 0.83rem;
}

.invoice-gate-issuer strong {
    color: var(--ink);
    text-align: right;
}

.checkout-billing-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.checkout-invoice-issuer {
    display: grid;
    gap: 3px;
    margin: 3px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.checkout-invoice-issuer span {
    color: var(--muted);
    font-size: 0.78rem;
}

.checkout-invoice-issuer strong {
    font-size: 0.9rem;
}

.terms-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.terms-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.terms-consent a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(181, 78, 43, 0.42);
    text-underline-offset: 3px;
}

.terms-consent a:hover,
.terms-consent a:focus-visible {
    color: var(--primary-deep);
    text-decoration-color: currentColor;
}

.legal-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    margin-top: 42px;
    padding: 18px 4px 0;
    border-top: 1px solid rgba(73, 61, 49, 0.14);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.legal-footer-brand {
    flex: 0 0 auto;
    color: var(--ink);
    font-weight: 700;
}

.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
}

.legal-footer-links a {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.legal-footer-links a:hover,
.legal-footer-links a:focus-visible {
    color: var(--primary-deep);
    text-decoration-color: currentColor;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fffaf5;
    box-shadow: 0 12px 26px rgba(185, 92, 55, 0.26);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #2e7c76);
    color: #f8fbfa;
    box-shadow: 0 12px 26px rgba(31, 95, 91, 0.22);
}

.btn-ghost {
    background: rgba(36, 31, 26, 0.06);
    color: var(--text);
}

.btn-full {
    width: 100%;
}

.assistant-shell {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    display: grid;
    justify-items: end;
    gap: 14px;
}

.assistant-dock {
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(var(--assistant-dock-offset-y, 0px));
}

.assistant-teaser,
.assistant-launcher {
    border: 0;
    cursor: pointer;
}

.assistant-teaser {
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 251, 246, 0.96);
    color: var(--text);
    box-shadow: 0 18px 42px rgba(30, 24, 18, 0.16);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assistant-teaser:hover,
.assistant-launcher-round:hover {
    transform: translateY(-2px);
}

.assistant-teaser-dot,
.assistant-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2e9d62;
    box-shadow: 0 0 0 6px rgba(46, 157, 98, 0.12);
}

.assistant-teaser-copy {
    display: grid;
    justify-items: start;
    gap: 2px;
}

.assistant-teaser-copy strong {
    font-size: 0.98rem;
}

.assistant-teaser-copy small {
    color: var(--muted);
    font-size: 0.82rem;
}

.assistant-launcher-round {
    width: 64px;
    height: 64px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary), #2e7c76);
    color: #f8fbfa;
    box-shadow: 0 20px 42px rgba(31, 95, 91, 0.32);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.assistant-launcher-round.is-dragging {
    cursor: grabbing;
}

.assistant-launcher-icon {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.assistant-panel {
    width: min(450px, calc(100vw - 28px));
    height: min(760px, calc(100vh - 44px));
    height: min(760px, calc(100dvh - 44px));
    max-height: min(760px, calc(100vh - 44px));
    max-height: min(760px, calc(100dvh - 44px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 251, 246, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow: 0 30px 70px rgba(30, 24, 18, 0.22);
    backdrop-filter: blur(14px);
    overflow: hidden;
    animation: assistantPanelIn 0.24s ease-out both;
}

@keyframes assistantPanelIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.assistant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assistant-head-copy {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    overflow: hidden;
    padding: 4px;
    border: 1px solid rgba(17, 58, 63, 0.13);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 95, 91, 0.18);
}

.assistant-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.assistant-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.assistant-private-badge {
    display: inline-flex;
    margin-left: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #246f49;
    background: rgba(46, 157, 98, 0.1);
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

#portal-assistant-title {
    display: block;
    color: var(--text);
    font-size: 1.04rem;
    line-height: 1.25;
}

.assistant-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assistant-head-button,
.assistant-close {
    border: 0;
    min-height: 44px;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.06);
    color: var(--text);
    cursor: pointer;
}

.assistant-head-button {
    padding: 0 12px;
    font-size: 0.8rem;
}

.assistant-close {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
    font-size: 1.35rem;
}

.assistant-thread-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 16px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 241, 232, 0.9)),
        radial-gradient(circle at top right, rgba(31, 95, 91, 0.08), transparent 34%);
    border: 1px solid rgba(36, 31, 26, 0.05);
    overflow: hidden;
}

.assistant-status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(46, 157, 98, 0.08);
    color: #246f49;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.assistant-status .assistant-status-dot {
    width: 8px;
    height: 8px;
    box-shadow: none;
}

.assistant-shell[data-assistant-status="busy"] .assistant-status-dot {
    background: #cf8a31;
    box-shadow: 0 0 0 6px rgba(207, 138, 49, 0.13);
    animation: assistantPulse 1s ease-in-out infinite;
}

.assistant-shell[data-assistant-status="error"] .assistant-status-dot {
    background: #b94a37;
    box-shadow: 0 0 0 6px rgba(185, 74, 55, 0.12);
}

@keyframes assistantPulse {
    50% {
        opacity: 0.48;
    }
}

.assistant-thread {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    display: grid;
    gap: 12px;
    padding: 2px 5px 2px 1px;
    scrollbar-color: rgba(31, 95, 91, 0.28) transparent;
    scrollbar-width: thin;
}

.assistant-bubble {
    max-width: 88%;
    margin: 0;
    padding: 12px 15px;
    border-radius: 18px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    box-shadow: 0 8px 18px rgba(45, 34, 25, 0.055);
}

.assistant-bubble.is-assistant {
    border: 1px solid rgba(31, 95, 91, 0.12);
    border-bottom-left-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    justify-self: start;
}

.assistant-bubble.is-user {
    border-bottom-right-radius: 6px;
    background: #f1ddd2;
    color: #4c291b;
    justify-self: end;
}

.assistant-bubble.is-loading {
    color: var(--muted);
    font-style: italic;
}

.assistant-composer {
    display: grid;
    gap: 12px;
    min-height: 0;
    padding: 2px 2px 0;
}

.assistant-composer-label {
    margin: 0;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

.assistant-actions {
    display: grid;
    gap: 10px;
    max-height: clamp(126px, 26vh, 210px);
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-color: rgba(31, 95, 91, 0.28) transparent;
    scrollbar-width: thin;
}

.assistant-option,
.assistant-chip,
.assistant-link {
    border: 0;
    min-height: 44px;
    height: auto;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(36, 31, 26, 0.06);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.assistant-option:hover,
.assistant-chip:hover,
.assistant-link:hover {
    background: rgba(31, 95, 91, 0.1);
    transform: translateY(-1px);
}

.assistant-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(31, 95, 91, 0.08);
    color: var(--secondary);
    font-weight: 700;
}

.assistant-link::after {
    content: "\2192";
    font-size: 1.1rem;
}

.assistant-link-strong {
    background: var(--secondary);
    color: #f8fbfa;
}

.assistant-link-strong:hover {
    background: #2e7c76;
}

.assistant-chip-strong {
    background: rgba(185, 92, 55, 0.14);
}

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

.assistant-feedback-question {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.assistant-escalation {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(185, 92, 55, 0.24);
    border-radius: 16px;
    background: rgba(185, 92, 55, 0.08);
}

.assistant-escalation p {
    margin: 0;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

.assistant-escalation .assistant-chip {
    width: 100%;
    background: var(--secondary);
    color: #f8fbfa;
    text-align: center;
}

.assistant-question-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    padding: 5px;
    border: 1px solid rgba(36, 31, 26, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(45, 34, 25, 0.05);
}

.assistant-question-form:focus-within {
    border-color: rgba(31, 95, 91, 0.42);
    box-shadow: 0 0 0 4px rgba(31, 95, 91, 0.08);
}

.assistant-question-form input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.4;
}

.assistant-question-form button {
    width: 46px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: var(--secondary);
    color: #f8fbfa;
    cursor: pointer;
}

.assistant-question-form button:disabled,
.assistant-support-actions button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.assistant-question-form svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.assistant-support-form {
    padding-top: 4px;
    min-height: 0;
    overflow-y: auto;
}

.assistant-support-form label {
    display: grid;
    gap: 8px;
}

.assistant-support-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.assistant-shell.is-open .assistant-dock {
    display: none;
}

.assistant-panel[hidden],
.assistant-dock[hidden],
.assistant-teaser[hidden],
.assistant-launcher[hidden],
.assistant-composer[hidden],
.assistant-actions[hidden],
.assistant-support-form[hidden] {
    display: none !important;
}

.assistant-teaser:focus-visible,
.assistant-launcher:focus-visible,
.assistant-head-button:focus-visible,
.assistant-close:focus-visible,
.assistant-option:focus-visible,
.assistant-chip:focus-visible,
.assistant-link:focus-visible,
.assistant-question-form button:focus-visible {
    outline: 3px solid rgba(31, 95, 91, 0.34);
    outline-offset: 3px;
}

.catalog-layout,
.checkout-layout,
.history-layout {
    display: grid;
    gap: 22px;
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.45fr);
    gap: 22px;
    align-items: start;
}

.catalog-main {
    gap: 32px;
}

.catalog-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    align-items: start;
}

.catalog-main,
.history-detail,
.checkout-panel {
    display: grid;
    gap: 20px;
}

.page-head,
.product-section,
.checkout-panel,
.checkout-side,
.history-list,
.history-detail,
.confirmation-panel {
    padding: 26px;
}

.section-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

.photo-badge,
.student-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.08);
    color: var(--text);
    font-weight: 700;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-link {
    background: rgba(36, 31, 26, 0.05);
}

.section-row,
.cart-head,
.summary-row,
.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.section-row h2,
.cart-head h2,
.history-detail h2 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.55rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.product-card {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 242, 234, 0.92)),
        linear-gradient(135deg, var(--card-accent), rgba(255, 255, 255, 0));
    border: 1px solid rgba(36, 31, 26, 0.07);
    min-height: 170px;
}

.product-card-gallery {
    min-height: 220px;
}

.product-card h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
}

.product-card-gallery strong {
    font-size: 1.04rem;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.84);
    color: var(--muted);
    font-size: 0.88rem;
}

.card-tag-light {
    background: rgba(255, 250, 244, 0.16);
    color: #fffaf5;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.product-actions form {
    margin: 0;
}

.product-actions .btn {
    min-height: 44px;
}

.visual-stage {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.visual-stage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.visual-stage-head h1 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 2rem;
}

.student-summary {
    display: grid;
    gap: 18px;
}

.student-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.student-summary-head h1 {
    margin: 0;
    font-family: var(--font-title);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
}

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

.linked-access-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.linked-access-card {
    display: grid;
    gap: 4px;
    min-width: 170px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(36, 31, 26, 0.04);
    border: 1px solid rgba(36, 31, 26, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.linked-access-card:hover {
    transform: translateY(-1px);
}

.linked-access-card strong {
    font-size: 0.98rem;
}

.linked-access-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.linked-access-card.is-active {
    background: rgba(185, 92, 55, 0.1);
    border-color: rgba(185, 92, 55, 0.22);
}

.student-info-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(36, 31, 26, 0.04);
}

.student-info-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.student-info-card strong {
    font-size: 1rem;
}

.visual-main,
.preview-dialog-visual {
    min-height: 350px;
    border-radius: 26px;
    padding: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(24, 19, 15, 0.48)),
        radial-gradient(circle at top left, var(--preview-accent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--preview-accent) 85%, #5f2c1f), #241a16 78%);
    color: #fffaf5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.visual-main-copy,
.preview-visual-copy {
    width: 100%;
}

.visual-main-copy h2,
.preview-dialog-visual h2 {
    margin: 12px 0 8px;
    font-family: var(--font-title);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 0.98;
}

.visual-main-copy strong,
.preview-dialog-visual strong {
    font-size: 1.05rem;
}

.preview-visual-kicker {
    margin: 14px 0 10px;
    color: rgba(255, 250, 245, 0.74);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

.preview-visual-price {
    min-width: 150px;
    align-self: flex-end;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 250, 244, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: right;
    font-size: 1.15rem;
}

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

.school-thumb-grid {
    grid-template-columns: 1fr;
}

.school-visual-main.has-photo {
    background-position: center;
    background-size: cover;
}

.thumb-card {
    min-height: 96px;
    border: 1px solid rgba(36, 31, 26, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 244, 236, 0.9)),
        linear-gradient(135deg, var(--preview-accent), rgba(255, 255, 255, 0));
    color: var(--text);
    padding: 14px;
    text-align: left;
    cursor: default;
}

.school-thumb {
    cursor: pointer;
    display: grid;
    gap: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.school-thumb:hover {
    border-color: rgba(185, 92, 55, 0.26);
    transform: translateY(-1px);
}

.school-thumb.has-photo {
    background-position: center;
    background-size: cover;
}

.school-thumb.has-photo strong,
.school-thumb.has-photo span {
    color: #fffaf5;
    text-shadow: 0 2px 10px rgba(20, 16, 12, 0.55);
}

.school-thumb strong {
    font-size: 0.98rem;
}

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

.thumb-card.is-active {
    border-color: rgba(185, 92, 55, 0.26);
}

.visual-caption p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.student-caption {
    display: grid;
    gap: 2px;
}

.student-caption p:first-child {
    color: var(--text);
    font-weight: 700;
}

.product-bottom strong,
.cart-footer strong,
.summary-row strong,
.checkout-actions strong {
    font-size: 1.02rem;
}

.cart-dock {
    padding: 22px;
}

.sticky-card {
    position: sticky;
    top: 20px;
}

.cart-count,
.qty-pill {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.08);
}

.cart-lines,
.checkout-list,
.history-links {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.cart-line,
.checkout-item,
.history-link,
.feature-item,
.status-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}

.cart-line,
.checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
}

.cart-line-text,
.cart-line-actions,
.checkout-actions,
.detail-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-line-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.cart-line-text span,
.muted,
.empty-note,
.history-link span {
    color: var(--muted);
}

.line-student {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary-deep);
}

.line-photo {
    margin: 2px 0 0;
    color: var(--secondary);
    font-size: 0.86rem;
}

.line-photo span {
    color: var(--muted);
    font-size: 0.78rem;
}

.cart-footer {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.cart-toast {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 92px;
    min-width: 220px;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(36, 31, 26, 0.9);
    color: #fffaf5;
    box-shadow: 0 18px 40px rgba(24, 19, 15, 0.24);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 140;
}

.cart-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.icon-button,
.link-button {
    border: 0;
    cursor: pointer;
    background: rgba(36, 31, 26, 0.07);
    color: var(--text);
    border-radius: 12px;
}

.icon-button {
    width: 34px;
    height: 34px;
}

.icon-button.remove {
    background: rgba(185, 92, 55, 0.1);
    color: var(--primary-deep);
}

.icon-button:hover,
.link-button:hover {
    background: rgba(31, 95, 91, 0.13);
}

.icon-button.remove:hover {
    background: rgba(185, 92, 55, 0.18);
}

.link-button {
    min-height: 34px;
    padding: 0 12px;
}

.checkout-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    align-items: start;
}

.checkout-layout > :only-child {
    grid-column: 1 / -1;
    width: min(100%, 760px);
    justify-self: center;
}

.checkout-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.checkout-item.compact h3,
.checkout-item h3 {
    margin: 0 0 4px;
}

.checkout-side {
    display: grid;
    gap: 16px;
    align-self: start;
}

.cart-promotion {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid rgba(31, 95, 91, 0.16);
    border-radius: 15px;
    background: rgba(31, 95, 91, 0.07);
}

.cart-promotion.is-applied,
.cart-promotion.is-unlocked {
    border-color: rgba(31, 95, 91, 0.24);
    background: rgba(31, 95, 91, 0.1);
}

.cart-promotion-icon {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
}

.cart-promotion-copy {
    min-width: 0;
}

.cart-promotion-copy strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.cart-promotion-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.cart-promotion-rules,
.line-promotion ul {
    margin: 7px 0 0;
    padding-left: 18px;
}

.cart-promotion-rules li,
.line-promotion li {
    margin-top: 3px;
}

.checkout-price-breakdown {
    display: grid;
    gap: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.checkout-price-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.checkout-price-breakdown .is-discount {
    color: var(--secondary);
}

.cart-promotion-saving,
.line-promotion {
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 800;
}

.line-promotion {
    margin: 5px 0 0;
}

.line-promotion strong {
    display: block;
}

.builder-promotion-status {
    position: fixed;
    right: 50%;
    bottom: 88px;
    z-index: 64;
    width: min(calc(100% - 28px), 520px);
    transform: translateX(50%);
    filter: drop-shadow(0 14px 24px rgba(24, 19, 15, 0.14));
}

.builder-promotion-status[hidden] {
    display: none;
}

.builder-promotion-status .cart-promotion {
    padding: 10px 12px;
    background: rgba(246, 252, 250, 0.97);
    backdrop-filter: blur(14px);
}

.cart-addon-overlay {
    position: fixed;
    inset: 0;
    z-index: 145;
    display: grid;
    place-items: center;
    padding: 20px;
}

.cart-addon-overlay[hidden] {
    display: none;
}

.cart-addon-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(16, 26, 25, 0.5);
    backdrop-filter: blur(8px);
}

.cart-addon-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    padding: 28px;
    border: 1px solid rgba(31, 95, 91, 0.18);
    border-radius: 26px;
    background: #fffdf9;
    box-shadow: 0 28px 80px rgba(20, 31, 29, 0.28);
    outline: none;
}

.cart-addon-dialog > p {
    margin: 8px 38px 20px 0;
    color: var(--muted);
}

.cart-addon-dialog h2 {
    margin: 5px 38px 0 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.cart-addon-kicker {
    color: var(--secondary);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cart-addon-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
}

.cart-addon-grid {
    display: grid;
    gap: 10px;
}

.cart-addon-card {
    min-height: 84px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 13px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    color: var(--text);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.cart-addon-card:hover,
.cart-addon-card:focus-visible {
    border-color: rgba(31, 95, 91, 0.42);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(31, 95, 91, 0.1);
}

.cart-addon-visual {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: linear-gradient(145deg, #eef6f2, #f8efe2);
    color: var(--secondary);
    font-size: 1.15rem;
    font-weight: 900;
}

.cart-addon-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-addon-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.cart-addon-copy small {
    color: var(--muted);
    font-size: 0.72rem;
}

.cart-addon-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-addon-copy b {
    color: var(--secondary);
    font-size: 0.86rem;
}

.cart-addon-arrow {
    color: var(--secondary);
    font-size: 1.25rem;
}

.cart-addon-dismiss {
    width: 100%;
    margin-top: 14px;
}

.cart-line-price,
.checkout-line-price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.cart-line-price s,
.checkout-line-price s {
    color: var(--muted);
    font-size: 0.82rem;
}

.summary-row {
    min-height: 72px;
    padding: 0 2px;
}

.summary-row.total {
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.status-card,
.feature-item {
    padding: 16px;
}

.status-card h3 {
    margin: 0 0 6px;
}

.history-layout {
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.35fr);
    align-items: start;
}

.history-link {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.history-link.is-active {
    border-color: rgba(185, 92, 55, 0.26);
    background: rgba(255, 245, 237, 0.86);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-confirmed {
    background: rgba(31, 95, 91, 0.12);
    color: #175a55;
    border-color: rgba(31, 95, 91, 0.18);
}

.status-production {
    background: rgba(185, 92, 55, 0.12);
    color: var(--primary-deep);
    border-color: rgba(185, 92, 55, 0.2);
}

.status-shipped {
    background: rgba(37, 91, 171, 0.1);
    color: #1f5299;
    border-color: rgba(37, 91, 171, 0.18);
}

.status-completed {
    background: rgba(104, 119, 43, 0.12);
    color: #5d6d24;
    border-color: rgba(104, 119, 43, 0.18);
}

.status-withdrawn {
    background: rgba(60, 51, 45, 0.1);
    color: #4b423b;
    border-color: rgba(60, 51, 45, 0.16);
}

.status-neutral {
    background: rgba(36, 31, 26, 0.07);
    color: var(--muted);
    border-color: rgba(36, 31, 26, 0.08);
}

.detail-head {
    margin-bottom: 8px;
}

.detail-nav {
    flex-wrap: wrap;
}

.status-card h3,
.order-status-panel h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.24rem;
}

.order-status-panel,
.retract-panel {
    display: grid;
    gap: 16px;
}

.status-timeline {
    display: grid;
    gap: 14px;
}

.status-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.status-step:first-child {
    border-top: 0;
    padding-top: 0;
}

.status-step-copy {
    display: grid;
    gap: 4px;
}

.status-step-copy strong {
    font-size: 1rem;
}

.status-step-copy p {
    margin: 0;
}

.status-dot {
    width: 14px;
    height: 14px;
    margin-top: 5px;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.14);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.status-step.is-complete .status-dot,
.status-step.is-current .status-dot {
    background: var(--primary);
}

.status-step.is-upcoming .status-step-copy strong {
    color: var(--muted);
}

.nav-link-button {
    background: rgba(36, 31, 26, 0.05);
}

.confirmation-layout {
    display: flex;
    justify-content: center;
}

.invoice-layout {
    display: flex;
    justify-content: center;
}

.invoice-panel {
    width: min(100%, 960px);
    display: grid;
    gap: 22px;
    padding: 28px;
}

.invoice-toolbar,
.invoice-actions,
.invoice-student-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.invoice-actions {
    width: min(100%, 320px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.invoice-actions .btn {
    width: 100%;
    padding: 0 10px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.invoice-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
}

.invoice-card p,
.invoice-row p {
    margin: 0;
}

.invoice-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

.invoice-table {
    display: grid;
    gap: 12px;
}

.invoice-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 100px 140px 140px;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.invoice-row-head {
    padding-top: 0;
    border-top: 0;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.invoice-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 1.08rem;
}

.invoice-totals {
    width: min(100%, 420px);
    margin: 20px 0 0 auto;
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.invoice-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.invoice-totals > div:not(.invoice-total) {
    color: var(--muted);
}

.invoice-totals > div strong {
    color: var(--text);
}

.invoice-totals .invoice-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
}

.preview-overlay[hidden] {
    display: none;
}

.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 12, 0.55);
    backdrop-filter: blur(8px);
}

.preview-dialog {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 40px), 1460px);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(340px, 0.7fr);
    gap: 24px;
    overflow: hidden;
    background: rgba(255, 251, 246, 0.96);
}

.preview-dialog-visual {
    min-height: min(76vh, 780px);
    min-height: min(76dvh, 780px);
}

.preview-dialog-copy {
    display: grid;
    align-content: start;
    gap: 18px;
    max-height: min(76vh, 780px);
    max-height: min(76dvh, 780px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 241, 232, 0.92));
    border: 1px solid rgba(36, 31, 26, 0.06);
}

.preview-dialog-copy p {
    margin: 0;
}

.preview-copy-kicker {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

.preview-copy-text {
    color: var(--text);
    line-height: 1.75;
    font-size: 1.06rem;
}

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

.preview-meta-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(36, 31, 26, 0.04);
}

.preview-meta-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.preview-meta-card strong {
    font-size: 1rem;
}

.preview-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-thumb-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.06);
    color: var(--text);
}

.preview-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: 0;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(36, 31, 26, 0.08);
    cursor: pointer;
    z-index: 2;
}

.preview-close:hover {
    background: #fff;
    transform: translateY(-1px);
}

.confirmation-panel {
    width: min(100%, 720px);
}

.confirmation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.feature-item {
    display: grid;
    gap: 6px;
}

.empty-note {
    margin: 6px 0 0;
}

.cart-flash {
    animation: cartFlash 0.35s ease;
}

@keyframes cartFlash {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    55% {
        transform: scale(1.01);
        box-shadow: 0 18px 40px rgba(31, 95, 91, 0.14);
    }
    100% {
        transform: scale(1);
        box-shadow: var(--shadow);
    }
}

@media (max-width: 980px) {
    .builder-layout,
    .catalog-layout,
    .checkout-layout,
    .history-layout {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }

    .preview-dialog {
        width: min(calc(100% - 24px), 760px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .preview-dialog-visual {
        min-height: min(62vh, 560px);
        min-height: min(62dvh, 560px);
    }

    .preview-dialog-copy {
        max-height: none;
        overflow: visible;
    }

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

@media (max-width: 700px) {
    .page-shell {
        width: min(calc(100% - 20px), var(--content-width));
        padding-top: 16px;
    }

    .site-header,
    .visual-stage-head,
    .section-row,
    .detail-head,
    .summary-row,
    .cart-line,
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav,
    .quick-links,
    .checkout-actions,
    .cart-line-actions,
    .detail-nav {
        width: 100%;
    }

    .top-nav {
        justify-content: space-between;
    }

    .nav-link,
    .nav-link-button,
    .quick-link {
        flex: 1 1 0;
    }

    .checkout-actions {
        justify-content: flex-start;
    }

    .checkout-item strong {
        margin-top: 4px;
    }

    .visual-thumbs {
        grid-template-columns: 1fr;
    }

    .preview-meta-grid {
        grid-template-columns: 1fr;
    }

    .student-summary-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-actions {
        width: 100%;
    }

    .student-info-grid,
    .invoice-grid,
    .invoice-row {
        grid-template-columns: 1fr;
    }

    .linked-access-card {
        width: 100%;
    }

    .notfound-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 22px 20px;
    }

    .preview-visual-price {
        width: 100%;
        text-align: left;
    }

    .product-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions form,
    .product-actions .btn {
        width: 100%;
    }

    .assistant-shell {
        right: 10px;
        left: 10px;
        bottom: 12px;
    }

    .assistant-dock,
    .assistant-panel {
        width: 100%;
    }

    .assistant-dock {
        justify-content: flex-end;
    }

    .assistant-teaser {
        flex: 1 1 auto;
    }

    .assistant-launcher-round {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .assistant-panel {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 24px;
    }

    .assistant-thread-shell {
        min-height: 190px;
    }

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

/* Guided parent journey */
.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy small {
    max-width: 220px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav {
    display: none;
}

.builder-layout {
    grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.builder-layout > *,
.catalog-main,
.catalog-main > *,
.checkout-layout > *,
.history-layout,
.history-layout > * {
    min-width: 0;
}

.history-layout {
    width: 100%;
}

.builder-layout > *,
.catalog-main > *,
.history-layout > * {
    animation: interfaceRise 0.42s ease both;
}

.catalog-main > *:nth-child(2),
.history-layout > *:nth-child(2) {
    animation-delay: 0.08s;
}

@keyframes interfaceRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.visual-stage {
    gap: 18px;
    padding: 24px;
}

.visual-stage-head {
    align-items: center;
}

.visual-stage-head h1 {
    font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.photo-badge {
    min-width: 42px;
    padding: 0 10px;
    justify-content: center;
    background: var(--text);
    color: #fffaf5;
}

.school-visual-main {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    isolation: isolate;
}

.school-visual-main.has-photo {
    min-height: 0;
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    background: #211c18;
}

.school-main-image {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    max-height: min(72vh, 760px);
    object-fit: contain;
    object-position: center;
    background: #211c18;
    -webkit-user-drag: none;
}

.school-visual-main.has-photo .visual-main-shade {
    display: none;
}

.school-visual-main.has-photo .visual-main-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 15px 18px 17px;
    background: #211c18;
}

.school-visual-main.has-photo .visual-main-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    line-height: 1.05;
}

.school-visual-main.has-photo .visual-main-copy strong {
    margin-left: auto;
}

.visual-main-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 16, 12, 0.03) 35%, rgba(20, 16, 12, 0.72) 100%);
}

.school-thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.school-thumb {
    min-width: 0;
    min-height: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
}

.school-thumb-visual {
    position: relative;
    min-height: 0;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.72), transparent 28%),
        linear-gradient(135deg, color-mix(in srgb, var(--preview-accent) 74%, #ffffff), var(--preview-accent));
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.25rem;
}

.school-thumb-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #e8e1da;
    -webkit-user-drag: none;
}

.school-thumb-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 10px;
}

.school-thumb-copy strong,
.school-thumb-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-thumb.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(185, 92, 55, 0.16);
}

.school-thumb.is-active .school-thumb-copy {
    background: rgba(185, 92, 55, 0.08);
}

.student-summary {
    gap: 22px;
    padding: 28px 30px;
}

.student-summary-head {
    align-items: stretch;
}

.active-student-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.student-avatar,
.linked-access-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #3d8882);
    color: #fff;
    font-family: var(--font-title);
    font-weight: 700;
}

.student-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.55rem;
    box-shadow: 0 10px 24px rgba(31, 95, 91, 0.2);
}

.student-summary-head h1 {
    font-size: clamp(2rem, 3.2vw, 3rem);
}

.student-school-line {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.student-school-line span {
    margin: 0 4px;
    color: rgba(36, 31, 26, 0.28);
}

.cart-shortcut {
    flex: 0 0 auto;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 9px 0 16px;
    border-radius: 999px;
    background: var(--text);
    color: #fffaf5;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-shortcut:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(36, 31, 26, 0.16);
}

.cart-shortcut strong {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--primary);
}

.student-switcher {
    display: grid;
    gap: 9px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.student-switcher-label {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.linked-access-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: thin;
}

.linked-access-card {
    min-width: 210px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.linked-access-avatar {
    width: 38px;
    height: 38px;
}

.linked-access-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.linked-access-copy strong,
.linked-access-copy > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linked-access-check {
    color: var(--primary-deep);
    font-size: 0.72rem;
    font-weight: 700;
}

.student-details {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.student-details-visible {
    display: grid;
    gap: 13px;
    padding-top: 18px;
}

.student-details-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
}

.student-details-visible .student-info-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
}

.student-details-visible .student-info-card {
    min-width: 0;
    min-height: 88px;
    align-content: center;
    padding: 16px 18px;
    background: rgba(36, 31, 26, 0.035);
    border: 1px solid rgba(36, 31, 26, 0.055);
}

.student-details-visible .student-info-card.is-student {
    grid-column: span 2;
}

.student-details-visible .student-info-card.is-class {
    grid-column: span 2;
}

.student-details-visible .student-info-card.is-school {
    grid-column: span 4;
}

.student-details-visible .student-info-card.is-city {
    grid-column: span 3;
}

.student-details-visible .student-info-card.is-photos {
    grid-column: span 1;
}

.student-details-visible .student-info-card span {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.student-details-visible .student-info-card strong {
    overflow-wrap: anywhere;
    font-family: var(--font-title);
    font-size: clamp(1.05rem, 1.35vw, 1.35rem);
    line-height: 1.2;
}

.campaign-deadline {
    flex: 0 0 auto;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 17px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(185, 92, 55, 0.11), rgba(185, 92, 55, 0.045));
    border: 1px solid rgba(185, 92, 55, 0.14);
}

.campaign-deadline-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fffaf5;
}

.campaign-deadline-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.campaign-deadline > span:last-child {
    display: grid;
    gap: 4px;
}

.campaign-deadline small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.campaign-deadline strong {
    font-family: var(--font-title);
    font-size: 1.22rem;
    line-height: 1.1;
}

.campaign-deadline.is-closed {
    background: rgba(36, 31, 26, 0.05);
    border-color: rgba(36, 31, 26, 0.08);
}

.campaign-deadline.is-closed .campaign-deadline-icon {
    background: var(--text);
}

.student-details summary {
    width: fit-content;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

.student-details[open] summary {
    margin-bottom: 14px;
    color: var(--text);
}

.student-details .campaign-context {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(31, 95, 91, 0.07);
}

.catalog-products {
    display: grid;
    gap: 30px;
    min-height: 580px;
    padding: 30px;
}

.catalog-products-head,
.product-collection-head,
.history-page-head,
.history-list-head,
.order-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.catalog-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(36, 31, 26, 0.035);
}

.selected-photo-chip {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 2px 9px;
    padding-left: 4px;
}

.selected-photo-chip span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.selected-photo-chip strong,
.selected-photo-chip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-photo-chip small {
    color: var(--muted);
}

.catalog-products-head h2,
.history-page-head h1 {
    margin: 0;
    font-family: var(--font-title);
    font-size: clamp(2rem, 3vw, 2.65rem);
}

.catalog-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.catalog-tabs button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.055);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

.catalog-tabs button:hover,
.catalog-tabs button.is-active,
.catalog-tabs button[aria-selected="true"] {
    background: var(--text);
    color: #fffaf5;
}

.catalog-tabs button:focus-visible {
    outline: 3px solid rgba(185, 92, 55, 0.24);
    outline-offset: 2px;
}

.product-collection {
    display: grid;
    gap: 14px;
    scroll-margin-top: 18px;
}

.product-collection[hidden] {
    display: none;
}

.product-collection + .product-collection {
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.product-collection-head h3,
.order-lines-section > .section-row h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.45rem;
}

.product-collection-head > span,
.order-lines-section > .section-row > span {
    color: var(--muted);
    font-size: 0.86rem;
}

.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 280px));
    gap: 18px;
    margin-top: 0;
}

.product-card {
    min-width: 0;
    min-height: 0;
    display: block;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(74, 52, 33, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px rgba(74, 52, 33, 0.12);
}

.product-card-visual {
    position: relative;
    width: 100%;
    min-height: 184px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.74), transparent 22%),
        linear-gradient(145deg, color-mix(in srgb, var(--card-accent) 62%, #fff), var(--card-accent));
}

.product-card-visual::before,
.product-card-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.36);
    transform: rotate(-12deg);
}

.product-card-visual:has(.product-card-image)::before,
.product-card-visual:has(.product-card-image)::after {
    display: none;
}

.product-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #edf2ef;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.035);
}

.product-photo-thumbnail {
    position: absolute;
    inset: 0;
}

.product-photo-thumbnail > span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(36, 31, 26, 0.14);
}

.product-visual-placeholder {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 5px;
    width: min(156px, 68%);
    min-height: 126px;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: color-mix(in srgb, var(--card-accent) 72%, #241f1a);
    text-align: center;
}

.product-visual-placeholder svg {
    width: 38px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.product-visual-placeholder strong,
.product-visual-placeholder small {
    line-height: 1.1;
}

.product-visual-placeholder small {
    color: var(--muted);
    font-size: 0.68rem;
}

.product-card-visual:has(.pack-card-preview)::before,
.product-card-visual:has(.pack-card-preview)::after {
    display: none;
}

.pack-card-preview {
    position: absolute;
    inset: 20px 16px 38px;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
}

.pack-card-preview-configurable {
    align-items: center;
    min-height: 150px;
}

.pack-configurable-sheet {
    position: absolute;
    width: 112px;
    aspect-ratio: 13 / 18;
    border: 5px solid #fffaf3;
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 48%),
        color-mix(in srgb, var(--card-accent) 35%, #edf2ef);
    box-shadow: 0 16px 30px rgba(20, 25, 25, 0.25);
}

.pack-configurable-sheet-back {
    transform: translateX(-38px) rotate(-8deg);
    opacity: 0.72;
}

.pack-configurable-sheet-middle {
    transform: translateX(38px) rotate(8deg);
    opacity: 0.86;
}

.pack-configurable-sheet-front {
    z-index: 1;
    display: grid;
    place-content: center;
    gap: 2px;
    padding: 12px;
    color: var(--text);
    text-align: center;
}

.pack-configurable-sheet-front strong {
    font-family: var(--font-title);
    font-size: 2rem;
    line-height: 1;
}

.pack-configurable-sheet-front span {
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.15;
}

.pack-card-component {
    min-width: 0;
    flex: 0 1 78px;
    display: grid;
    gap: 5px;
    color: #fff;
}

.pack-card-component:nth-child(odd) {
    transform: rotate(-2deg) translateY(2px);
}

.pack-card-component:nth-child(even) {
    transform: rotate(2deg) translateY(-2px);
}

.pack-card-component-visual,
.pack-component-template {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--pack-component-ratio, 13 / 18);
    overflow: hidden;
    border: 4px solid var(--pack-component-bg, #f6f1e8);
    border-radius: 7px;
    background-color: var(--pack-component-bg, #f6f1e8);
    background-image: var(--pack-component-bg-image, none);
    background-position: var(--pack-component-bg-position, center);
    background-repeat: no-repeat;
    background-size: var(--pack-component-bg-fit, cover);
    box-shadow: 0 12px 24px rgba(20, 25, 25, 0.24);
}

.pack-card-component-visual > img,
.pack-component-template img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pack-card-component-name {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(20, 16, 12, 0.45);
}

.pack-component-symbol {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--pack-component-accent, #1f5f5b);
    font-family: var(--font-title);
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    font-weight: 800;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.65), rgba(31, 95, 91, 0.15));
}

.product-card-visual::before {
    width: 94px;
    height: 112px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 18px 12px 0 rgba(255, 255, 255, 0.09);
}

.product-card-pack .product-card-visual::before {
    width: 116px;
    height: 86px;
    border-radius: 18px;
}

.product-card-article .product-card-visual::before {
    width: 96px;
    height: 96px;
    border-radius: 50%;
}

.product-visual-symbol {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: color-mix(in srgb, var(--card-accent) 74%, #241f1a);
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(36, 31, 26, 0.12);
}

.product-preview-label {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-card-visual:hover .product-preview-label,
.product-card-visual:focus-visible .product-preview-label {
    opacity: 1;
    transform: translateY(0);
}

.product-card-copy {
    display: grid;
    gap: 8px;
    padding: 15px;
}

.product-kind {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-card h4 {
    min-height: 2.5em;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-card-footer form {
    margin: 0;
}

.product-add-button {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--text);
    color: #fffaf5;
    box-shadow: none;
}

.product-add-button:hover {
    background: var(--primary-deep);
}

.preview-dialog-visual {
    position: relative;
    overflow: hidden;
}

.preview-product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #edf2ef;
}

.preview-dialog-visual:has(.preview-product-image:not([hidden]))::after {
    content: "";
    position: absolute;
    inset: 42% 0 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(10, 33, 37, 0.82));
    pointer-events: none;
}

.preview-dialog-visual.has-pack-components::after {
    content: "";
    position: absolute;
    inset: 60% 0 0;
    z-index: 0;
    background: linear-gradient(180deg, transparent, rgba(10, 33, 37, 0.86));
    pointer-events: none;
}

.preview-dialog-visual.has-pack-components .preview-visual-copy,
.preview-dialog-visual.has-pack-components .preview-visual-price {
    display: none;
}

.preview-pack-components {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-content: start;
    gap: 18px;
    padding: 48px 34px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.82), transparent 25%),
        linear-gradient(145deg, color-mix(in srgb, var(--preview-accent) 24%, #f8f1e8), color-mix(in srgb, var(--preview-accent) 58%, #173f44));
}

.preview-pack-components[hidden] {
    display: none;
}

.preview-pack-component {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 36px rgba(20, 25, 25, 0.16);
}

.preview-pack-component-visual {
    height: clamp(180px, 31vh, 330px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #edf2ef;
}

.preview-pack-component-visual > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.preview-pack-component-visual > .pack-component-template {
    width: min(92%, 210px);
    max-height: 94%;
}

.preview-pack-component-visual.is-black-white,
.preview-pack-selected-photo.is-black-white {
    filter: grayscale(1) contrast(1.04);
}

.preview-pack-component-visual.is-sepia,
.preview-pack-selected-photo.is-sepia {
    filter: sepia(0.88) saturate(0.82) contrast(1.04);
}

.preview-pack-component-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.preview-pack-component-copy span {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.preview-pack-component-copy strong {
    color: var(--text);
    overflow-wrap: anywhere;
    font-size: 0.92rem;
    line-height: 1.25;
}

.preview-pack-component-configuration {
    display: grid;
    gap: 9px;
    padding-top: 8px;
    border-top: 1px solid rgba(49, 41, 34, 0.1);
}

.preview-pack-component-options {
    display: grid;
    gap: 9px;
}

.preview-pack-board-choice {
    padding: 8px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.preview-pack-component-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
}

.preview-pack-select-label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 750;
}

.preview-pack-select-label select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 26px 0 9px;
    border: 1px solid rgba(49, 41, 34, 0.14);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.preview-pack-select-label select:focus {
    border-color: var(--primary);
    outline: 2px solid color-mix(in srgb, var(--primary) 18%, transparent);
    outline-offset: 1px;
}

.preview-pack-selected-photo {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 750;
}

.preview-pack-selected-photo img {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.preview-pack-selected-photo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pack-photo-summary {
    display: grid;
    gap: 7px;
    margin: 10px 0 4px;
    padding: 10px 12px;
    border: 1px solid rgba(31, 95, 91, 0.13);
    border-radius: 12px;
    background: rgba(31, 95, 91, 0.055);
}

.pack-photo-summary p {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 1.2fr) auto;
    gap: 8px;
    align-items: baseline;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.pack-photo-summary p > strong {
    color: var(--text);
}

.pack-photo-summary p > span {
    color: var(--muted);
}

.pack-photo-summary p > small {
    color: var(--primary);
    font-size: 0.75rem;
    line-height: 1.3;
    font-weight: 800;
}

.pack-photo-summary-compact {
    margin-top: 7px;
    padding: 8px 9px;
}

.pack-photo-summary-compact summary {
    cursor: pointer;
    color: var(--primary-deep);
    font-size: 0.72rem;
    font-weight: 800;
}

.pack-photo-summary-compact p {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-top: 6px;
}

.pack-photo-summary-document {
    break-inside: avoid;
}

.preview-pack-summary {
    display: none;
}

.preview-dialog-visual .preview-visual-copy,
.preview-dialog-visual .preview-visual-price {
    position: relative;
    z-index: 2;
}

.preview-dialog-visual > .product-visual-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: 150px;
    height: 150px;
    color: var(--text);
    font-size: 3.2rem;
    transform: translate(-50%, -54%);
}

.preview-dialog-visual > .product-visual-symbol[hidden] {
    display: none;
}

.preview-dialog-copy form {
    margin-top: auto;
}

.product-card[data-product-dynamic="true"] .product-card-visual::before,
.product-card[data-product-dynamic="true"] .product-card-visual::after {
    display: none;
}

.parent-template-canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: min(116px, 70%);
    aspect-ratio: var(--parent-template-ratio, 13 / 18);
    overflow: hidden;
    border: 4px solid var(--parent-template-bg, #f6f1e8);
    border-radius: 8px;
    background-color: var(--parent-template-bg, #f6f1e8);
    background-image: var(--parent-template-bg-image, none);
    background-position: var(--parent-template-bg-position, center);
    background-repeat: no-repeat;
    background-size: var(--parent-template-bg-fit, cover);
    box-shadow: 0 16px 34px rgba(20, 25, 25, 0.2);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.product-card-visual:hover .parent-template-canvas {
    transform: translateY(-2px) rotate(-1deg);
}

.parent-template-canvas.is-black-white {
    filter: grayscale(1) contrast(1.04);
}

.parent-template-canvas.is-sepia {
    filter: sepia(0.88) saturate(0.82) contrast(1.04);
}

.parent-template-fixed-art {
    position: absolute;
    left: var(--art-x);
    top: var(--art-y);
    z-index: 1;
    width: var(--art-w);
    height: var(--art-h);
    opacity: var(--art-opacity, 1);
    transform: rotate(var(--art-rotation, 0deg));
    background-image: var(--art-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: var(--art-fit, contain);
    filter: var(--art-filter, none);
    pointer-events: none;
}

.parent-template-slot {
    position: absolute;
    left: var(--slot-x);
    top: var(--slot-y);
    z-index: 2;
    width: var(--slot-w);
    height: var(--slot-h);
    overflow: hidden;
    transform: rotate(var(--slot-rotation, 0deg));
    border: 1px solid color-mix(in srgb, var(--parent-template-accent, #123f46) 45%, white);
    border-radius: var(--slot-radius, 2px);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--parent-template-accent, #123f46) 22%, white), color-mix(in srgb, var(--parent-template-accent, #123f46) 48%, white));
}

.parent-template-slot.is-black-white img {
    filter: grayscale(1) contrast(1.04);
}

.parent-template-slot.is-sepia img {
    filter: sepia(0.88) saturate(0.82) contrast(1.04);
}

.parent-template-slot img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
    object-fit: cover;
    image-orientation: from-image;
    transform: translate(-50%, -50%) rotate(var(--source-rotation, 0deg));
    transform-origin: center;
}

.parent-template-slot.is-orientation-mismatch img {
    object-fit: contain;
}

.parent-template-label-zone {
    position: absolute;
    left: var(--label-x);
    top: var(--label-y);
    z-index: 3;
    width: var(--label-w);
    height: var(--label-h);
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 2px 4px;
    overflow: hidden;
    border: 1px dashed color-mix(in srgb, var(--parent-template-accent, #123f46) 58%, white);
    border-radius: 3px;
    color: var(--parent-template-accent, #123f46);
    font-size: clamp(0.28rem, 1.2vw, 0.5rem);
    font-weight: 800;
    line-height: 1.05;
}

.product-card-copy > form[data-product-order-form] {
    display: grid;
    gap: 9px;
    margin: 0;
}

.render-mode-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 5px;
    margin: 0;
    padding: 0;
    border: 0;
}

.render-mode-picker legend,
.render-mode-picker > strong {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.render-mode-picker label {
    position: relative;
    cursor: pointer;
}

.render-mode-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.render-mode-picker label span {
    display: grid;
    place-items: center;
    min-height: 34px;
    padding: 5px 7px;
    border: 1px solid rgba(49, 41, 34, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-align: center;
}

.render-mode-picker input:checked + span {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, white);
    color: var(--primary-deep);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent);
}

.parent-template-canvas-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(68%, 640px);
    max-height: none;
    transform: translate(-50%, -54%);
}

.parent-template-canvas-modal.is-template-tall-or-square {
    width: auto;
    height: 72%;
    max-width: 78%;
}

.parent-template-canvas-modal[hidden],
.render-mode-picker-modal[hidden] {
    display: none;
}

.render-mode-picker-modal {
    margin: 12px 0;
}

.cart-line-render-mode {
    display: inline-flex;
    margin-top: 3px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(31, 95, 91, 0.09);
    color: var(--primary-deep);
    font-size: 0.68rem;
    font-weight: 750;
}

.history-page-head {
    margin-bottom: 2px;
    padding: 6px 4px;
}

.history-list {
    padding: 18px;
}

.history-list-head {
    align-items: baseline;
    padding: 2px 3px 12px;
    border-bottom: 1px solid var(--line);
}

.history-list-head span {
    color: var(--muted);
    font-size: 0.78rem;
}

.history-link {
    gap: 10px;
    padding: 15px;
}

.history-link-top,
.history-link-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.history-link-meta {
    color: var(--muted);
    font-size: 0.8rem;
}

.history-link-meta strong {
    margin-left: auto;
    color: var(--text);
}

.history-link.is-active {
    border-color: rgba(185, 92, 55, 0.4);
    box-shadow: 0 10px 24px rgba(185, 92, 55, 0.1);
}

.history-link.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 0 6px 6px 0;
    background: var(--primary);
}

.history-link {
    position: relative;
}

.history-detail {
    padding: 28px;
}

.order-overview {
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.order-overview h2 {
    margin-bottom: 5px;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.order-overview p {
    margin: 0;
}

.order-overview-total {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.order-overview-total > span:first-child {
    color: var(--muted);
    font-size: 0.8rem;
}

.order-overview-total > strong {
    font-family: var(--font-title);
    font-size: 1.65rem;
}

.order-actions {
    justify-content: flex-start;
}

.order-actions .btn,
.order-actions .nav-link-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 14px;
}

.order-status-panel {
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(240, 247, 245, 0.72));
}

.status-step {
    position: relative;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 13px;
    padding: 8px 0 14px;
    border-top: 0;
}

.status-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 37px;
    bottom: -1px;
    left: 16px;
    width: 2px;
    background: rgba(36, 31, 26, 0.1);
}

.status-step.is-complete:not(:last-child)::after {
    background: rgba(31, 95, 91, 0.48);
}

.status-dot {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    margin-top: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #eee7df;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
}

.status-step.is-complete .status-dot,
.status-step.is-current .status-dot {
    color: #fff;
    background: var(--secondary);
}

.status-step.is-current .status-dot {
    box-shadow: 0 0 0 5px rgba(31, 95, 91, 0.14);
}

.order-lines-section {
    display: grid;
    gap: 4px;
}

.retract-panel {
    background: rgba(36, 31, 26, 0.025);
}

.retract-panel.can-withdraw {
    border-color: rgba(185, 92, 55, 0.18);
    background: rgba(185, 92, 55, 0.055);
}

.retract-panel-copy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.retract-panel-copy p {
    margin: 6px 0 0;
}

.retract-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(185, 92, 55, 0.12);
    color: var(--primary-deep);
    font-family: var(--font-title);
    font-weight: 700;
}

.retract-button {
    width: fit-content;
}

.withdrawal-confirmation-form {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66);
}

.withdrawal-confirmation-form .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.confirmation-check input {
    margin-top: 4px;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 28px 8px 10px;
}

.empty-state h2,
.empty-state p {
    margin: 0;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(31, 95, 91, 0.1);
    color: var(--secondary);
    font-family: var(--font-title);
    font-weight: 700;
}

.cart-count-pulse {
    animation: cartCountPulse 0.38s ease;
}

@keyframes cartCountPulse {
    50% { transform: scale(1.18); }
}

@media (max-width: 1320px) {
    .builder-layout {
        grid-template-columns: minmax(390px, 470px) minmax(0, 1fr);
        gap: 24px;
    }

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

    .student-details-visible .student-info-card.is-student,
    .student-details-visible .student-info-card.is-class,
    .student-details-visible .student-info-card.is-city,
    .student-details-visible .student-info-card.is-photos {
        grid-column: auto;
    }

    .student-details-visible .student-info-card.is-school {
        grid-column: span 2;
    }
}

@media (max-width: 1100px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }

    .builder-layout .sticky-card {
        position: static;
    }

    .school-visual-main {
        min-height: min(62vh, 560px);
    }

    .visual-stage {
        max-width: none;
        width: 100%;
        margin: 0;
    }

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

    .student-details-visible .student-info-card.is-student,
    .student-details-visible .student-info-card.is-class,
    .student-details-visible .student-info-card.is-city,
    .student-details-visible .student-info-card.is-photos {
        grid-column: auto;
    }

    .student-details-visible .student-info-card.is-school {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .page-shell {
        padding-bottom: 112px;
    }

    .top-nav {
        display: none;
    }

    .mobile-nav {
        position: fixed;
        right: 12px;
        bottom: 10px;
        left: 12px;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        max-width: 560px;
        margin: 0 auto;
        padding: 7px;
        border: 1px solid rgba(255, 255, 255, 0.68);
        border-radius: 22px;
        background: rgba(255, 251, 246, 0.94);
        box-shadow: 0 18px 44px rgba(36, 31, 26, 0.2);
        backdrop-filter: blur(16px);
    }

    .mobile-nav-link {
        position: relative;
        min-height: 56px;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        border-radius: 16px;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
    }

    .mobile-nav-link svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
    }

    .mobile-nav-link.is-active {
        background: var(--text);
        color: #fffaf5;
    }

    .mobile-nav-count {
        position: absolute;
        top: 5px;
        left: calc(50% + 9px);
        min-width: 19px;
        height: 19px;
        display: grid;
        place-items: center;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 0.75rem;
    }

    .assistant-shell {
        bottom: 12px;
    }

    .assistant-panel {
        height: calc(100vh - 24px);
        height: calc(100dvh - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    body.has-mobile-parent-nav .assistant-shell {
        bottom: 88px;
    }

    body.has-mobile-parent-nav .assistant-panel {
        height: calc(100vh - 108px);
        height: calc(100dvh - 108px);
        max-height: calc(100vh - 108px);
        max-height: calc(100dvh - 108px);
    }

    .assistant-teaser {
        display: none;
    }

    .assistant-dock {
        width: auto;
    }

    .assistant-launcher-round {
        margin-left: auto;
    }

    .cart-toast {
        bottom: 164px;
        width: min(360px, calc(100vw - 24px));
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .builder-promotion-status {
        bottom: 84px;
    }

    .builder-promotion-status .cart-promotion-copy p,
    .builder-promotion-status .cart-promotion-rules {
        display: none;
    }

    .cart-addon-overlay {
        padding: 12px;
    }

    .cart-addon-dialog {
        padding: 22px 16px 16px;
        border-radius: 22px;
    }

    .cart-addon-dialog > p {
        margin-bottom: 14px;
        font-size: 0.88rem;
    }

    .cart-addon-card {
        min-height: 70px;
        grid-template-columns: 50px minmax(0, 1fr) 22px;
        gap: 10px;
        padding: 8px 10px;
    }

    .cart-addon-visual {
        width: 50px;
        height: 50px;
        border-radius: 11px;
    }

    body.stage-builder .page-shell,
    body.stage-checkout .page-shell,
    body.stage-history .page-shell {
        width: min(calc(100% - 20px), var(--content-width));
    }

    .brand-link {
        min-height: 44px;
    }

    .site-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .brand-copy small {
        max-width: 180px;
    }

    .visual-stage,
    .catalog-products,
    .student-summary,
    .history-list,
    .history-detail {
        border-radius: 22px;
    }

    .visual-stage {
        padding: 15px;
    }

    .visual-stage-head {
        flex-direction: row;
        align-items: center;
    }

    .school-visual-main {
        min-height: min(58vh, 470px);
        padding: 18px;
        border-radius: 20px;
    }

    .school-visual-main.has-photo img {
        max-height: min(54vh, 455px);
    }

    .visual-main-copy h2 {
        font-size: 1.8rem;
    }

    .school-visual-main.has-photo .visual-main-copy {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-right: 82px;
    }

    .school-visual-main.has-photo .visual-main-copy .card-tag {
        grid-column: 1 / -1;
    }

    .school-visual-main.has-photo .visual-main-copy h2,
    .school-visual-main.has-photo .visual-main-copy strong {
        min-width: 0;
        margin-left: 0;
    }

    .school-thumb-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
    }

    .school-thumb {
        flex: 0 0 128px;
        scroll-snap-align: start;
    }

    .student-summary {
        padding: 18px;
    }

    .student-summary-head {
        flex-direction: column;
        align-items: stretch;
    }

    .student-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .student-summary-head h1 {
        font-size: 1.6rem;
    }

    .campaign-deadline {
        width: 100%;
        min-width: 0;
    }

    .student-school-line {
        font-size: 0.86rem;
    }

    .cart-shortcut {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
    }

    .cart-shortcut > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .cart-shortcut strong {
        background: transparent;
    }

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

    .linked-access-card {
        width: auto;
    }

    .catalog-products {
        gap: 22px;
        padding: 20px 16px;
    }

    .catalog-products-head,
    .history-page-head,
    .order-overview {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog-tabs {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .catalog-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .selected-photo-chip {
        width: 100%;
    }

    .catalog-tabs button {
        flex: 1 0 auto;
        justify-content: center;
        min-height: 44px;
    }

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

    .product-card-visual {
        min-height: 126px;
    }

    .product-card-copy {
        padding: 12px;
    }

    .product-card h4 {
        min-height: 2.55em;
        font-size: 0.94rem;
    }

    .product-card-footer {
        align-items: flex-end;
        flex-direction: column;
    }

    .product-card-footer form,
    .product-add-button {
        width: 100%;
    }

    .product-add-button {
        min-height: 44px;
    }

    .checkout-actions .icon-button {
        width: 44px;
        height: 44px;
    }

    .checkout-actions .link-button {
        min-height: 44px;
    }

    .product-preview-label {
        display: none;
    }

    .preview-dialog {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }

    .preview-dialog-visual {
        min-height: min(58vh, 440px);
        min-height: min(58dvh, 440px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-end;
    }

    .preview-dialog-visual .preview-visual-price {
        width: auto;
        min-width: 0;
        align-self: flex-start;
    }

    .history-page-head .btn {
        width: 100%;
    }

    .history-list {
        padding: 15px;
    }

    .history-links {
        grid-auto-flow: column;
        grid-auto-columns: minmax(240px, 82vw);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 5px;
    }

    .history-link {
        scroll-snap-align: start;
    }

    .history-detail {
        padding: 20px 16px;
    }

    .order-overview-total {
        width: 100%;
        grid-template-columns: auto 1fr;
        align-items: center;
        justify-items: start;
    }

    .order-overview-total .status-chip {
        grid-column: 1 / -1;
    }

    .order-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-right: 68px;
    }

    .order-actions .btn:first-child {
        grid-column: 1 / -1;
    }

    .order-actions .btn,
    .order-actions .nav-link-button {
        justify-content: center;
        text-align: center;
    }

    .order-status-panel .section-row {
        gap: 10px;
    }

    .retract-button {
        width: 100%;
    }

    .assistant-teaser {
        display: none;
    }

    .assistant-dock {
        width: auto;
    }

    .assistant-launcher-round {
        margin-left: auto;
    }
}

.compact-cart-bar {
    position: fixed;
    right: 50%;
    bottom: 22px;
    z-index: 65;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 7px 8px 7px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(36, 31, 26, 0.94);
    color: #fffaf5;
    box-shadow: 0 18px 40px rgba(24, 19, 15, 0.24);
    transform: translateX(50%);
    backdrop-filter: blur(14px);
}

.compact-cart-bar[hidden] {
    display: none;
}

.compact-cart-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.compact-cart-action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
}

.product-recommendation {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(36, 31, 26, 0.1);
}

.product-description-details,
.checkout-details {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.product-description-details summary,
.checkout-details summary {
    width: fit-content;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
}

.product-description-details[open] summary,
.checkout-details[open] summary {
    margin-bottom: 12px;
    color: var(--text);
}

.checkout-groups,
.cart-student-group,
.cart-photo-group {
    display: grid;
    gap: 14px;
}

.checkout-groups {
    gap: 20px;
}

.cart-student-group {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.42);
}

.cart-group-head,
.cart-photo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cart-group-head span,
.cart-photo-head div > span {
    color: var(--primary-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.cart-group-head h2,
.cart-photo-head h3,
.cart-group-head p,
.cart-photo-head p {
    margin: 3px 0 0;
}

.cart-group-head h2 {
    font-family: var(--font-title);
    font-size: 1.45rem;
}

.cart-group-head p,
.cart-photo-head p,
.cart-photo-head > span {
    color: var(--muted);
    font-size: 0.84rem;
}

.cart-photo-group {
    padding: 15px;
    border-radius: 18px;
    background: rgba(36, 31, 26, 0.035);
}

.cart-photo-group .checkout-list {
    margin-top: 0;
}

.checkout-total {
    min-height: 0;
    padding-top: 0;
    border-top: 0;
}

.checkout-total strong {
    font-size: 1.45rem;
}

.checkout-details-content {
    display: grid;
    gap: 9px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.checkout-details-content p {
    margin: 0;
}

.checkout-details-content p:has(> span) {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.checkout-details-content strong {
    color: var(--text);
    text-align: right;
}

.cart-panel-student,
.cart-panel-photo {
    display: grid;
    gap: 9px;
}

.cart-panel-student > h3 {
    margin: 0;
}

.cart-panel-photo > strong {
    color: var(--secondary);
    font-size: 0.82rem;
}

@media (max-width: 820px) {
    .compact-cart-bar {
        right: 16px;
        bottom: 88px;
        left: 16px;
        justify-content: space-between;
        transform: none;
    }

    body.stage-builder.has-cart-items .assistant-shell {
        bottom: 150px;
    }

    body.stage-builder.has-cart-items .assistant-panel {
        height: calc(100vh - 170px);
        height: calc(100dvh - 170px);
        max-height: calc(100vh - 170px);
        max-height: calc(100dvh - 170px);
    }
}

@media (max-width: 700px) {
    .preview-dialog-visual.has-pack-components .preview-visual-copy,
    .preview-dialog-visual.has-pack-components .preview-visual-price,
    .preview-dialog-visual.has-dynamic-template .preview-visual-copy,
    .preview-dialog-visual.has-dynamic-template .preview-visual-price {
        display: none;
    }

    .preview-pack-components {
        grid-template-columns: 1fr;
        gap: 10px;
        align-content: start;
        padding: 54px 14px 18px;
    }

    .preview-pack-component {
        gap: 7px;
        padding: 8px;
        border-radius: 13px;
    }

    .preview-pack-component-visual {
        height: clamp(108px, 16vh, 132px);
    }

    .preview-pack-component-copy strong {
        font-size: 0.78rem;
    }

    .pack-photo-summary p {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .preview-pack-summary:not([hidden]) {
        display: grid;
        gap: 5px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .preview-pack-summary span {
        color: var(--primary);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .preview-pack-summary h2 {
        margin: 0;
        font-size: clamp(1.45rem, 8vw, 2rem);
        line-height: 1.05;
    }

    .preview-pack-summary strong {
        font-size: 1rem;
    }

    .cart-group-head,
    .cart-photo-head {
        align-items: flex-start;
    }

    .cart-student-group {
        padding: 14px;
    }

    .cart-photo-group {
        padding: 12px;
    }
}

@media (max-width: 430px) {
    .compact-cart-bar {
        gap: 8px;
        padding-left: 13px;
        font-size: 0.82rem;
    }

    .compact-cart-action {
        padding: 0 11px;
    }

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

    .product-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .product-card-visual {
        min-height: 100%;
    }

    .pack-card-preview {
        inset: 24px 8px 24px;
        gap: 4px;
    }

    .pack-card-component {
        flex-basis: 46px;
    }

    .pack-card-component:nth-child(n + 3) {
        display: none;
    }

    .pack-card-component-name {
        display: none;
    }

    .product-card-footer {
        align-items: stretch;
    }

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

    .student-details-visible .student-info-card.is-school {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .legal-footer {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 30px;
        padding-bottom: 74px;
    }

    .legal-footer-links {
        justify-content: flex-start;
        gap: 9px 16px;
    }

    .invoice-gate {
        padding: 12px;
    }

    .invoice-gate-dialog {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .invoice-gate-heading {
        margin-bottom: 20px;
    }

    .invoice-gate-heading h2 {
        font-size: clamp(1.75rem, 9vw, 2.2rem);
    }

    .invoice-gate-issuer {
        display: grid;
        gap: 3px;
    }

    .invoice-gate-issuer strong {
        text-align: left;
    }

    body.stage-focused-auth .page-shell {
        width: min(calc(100% - 24px), 1320px);
        padding-top: 20px;
    }

    body.stage-focused-auth .main-centered {
        min-height: calc(100vh - 140px);
    }

    .auth-card {
        padding: 34px 22px 28px;
        border-radius: 22px;
    }

    .auth-card-wide {
        width: 100%;
    }

    .recovery-card {
        margin: 0;
    }

    .auth-brand {
        margin-bottom: 22px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .auth-field-wide,
    .auth-field-span-4,
    .auth-field-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 430px) {
    .assistant-panel {
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 12px;
        border-radius: 22px;
    }

    .assistant-head,
    .assistant-head-actions {
        gap: 6px;
    }

    .assistant-head-copy {
        min-width: 0;
        gap: 8px;
    }

    .assistant-avatar {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    #portal-assistant-title {
        font-size: 0.95rem;
    }

    .assistant-head p {
        display: none;
    }

    .assistant-head-button {
        width: 40px;
        min-height: 40px;
        padding: 0;
        font-size: 0;
    }

    .assistant-head-button::before {
        content: "\21BB";
        font-size: 1.1rem;
    }

    .assistant-close {
        flex-basis: 40px;
        width: 40px;
        min-height: 40px;
    }

    .assistant-thread-shell {
        min-height: 0;
        gap: 8px;
        padding: 10px;
        border-radius: 18px;
    }

    .assistant-status {
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    .assistant-thread {
        gap: 8px;
        padding: 0;
        scrollbar-width: none;
    }

    .assistant-thread::-webkit-scrollbar,
    .assistant-actions::-webkit-scrollbar {
        display: none;
    }

    .assistant-bubble {
        max-width: 94%;
        padding: 10px 12px;
        font-size: 0.9rem;
        line-height: 1.42;
    }

    .assistant-composer {
        gap: 6px;
        padding: 0;
        overflow: hidden;
    }

    .assistant-composer-label {
        font-size: 0.84rem;
        line-height: 1.2;
    }

    .assistant-actions {
        gap: 6px;
        max-height: 112px;
        padding-right: 0;
        scrollbar-width: none;
    }

    .assistant-option,
    .assistant-chip,
    .assistant-link {
        min-height: 40px;
        padding: 8px 10px;
    }

    .assistant-question-form {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 5px;
        padding: 4px;
    }

    .assistant-question-form input {
        min-height: 42px;
        padding: 0 8px;
    }

    .assistant-question-form button {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .assistant-panel,
    .assistant-shell[data-assistant-status="busy"] .assistant-status-dot,
    .builder-layout > *,
    .catalog-main > *,
    .history-layout > *,
    .cart-count-pulse {
        animation: none;
    }
}

@media print {
    body.stage-invoice .bg-orb,
    body.stage-invoice .site-header,
    body.stage-invoice .messages,
    body.stage-invoice .assistant-shell,
    body.stage-invoice .cart-toast,
    body.stage-invoice .legal-footer,
    body.stage-invoice .invoice-actions {
        display: none !important;
    }

    body.stage-invoice .page-shell {
        width: 100%;
        padding: 0;
    }

    body.stage-invoice .invoice-panel {
        box-shadow: none;
        border: 0;
        background: #ffffff;
    }

    body[data-protected-media="1"] .page-shell,
    body[data-protected-media="1"] .preview-overlay {
        display: none !important;
    }

    body[data-protected-media="1"]::before {
        content: "Impression desactivee pour la protection des visuels.";
        display: block;
        padding: 48px 24px;
        color: #241f1a;
        font-family: var(--font-body);
        font-size: 1.2rem;
        text-align: center;
    }
}
.auth-login-shell {
    display: block;
    width: min(100%, 760px);
    margin-inline: auto;
}

.auth-login-wrap,
.auth-login-wrap .auth-card {
    width: 100%;
}

.auth-presentation-back {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .85rem .1rem;
    color: #6f5e55;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 12px rgba(255, 255, 255, .9);
    transition: color .18s ease, transform .18s ease;
}

.auth-presentation-back:hover,
.auth-presentation-back:focus-visible {
    color: var(--accent-deep);
    outline: none;
    transform: translateX(-3px);
}
