:root {
    --auth-brown: #7a5a3a;
    --auth-brown-2: #a67c52;
    --auth-caramel: #c9a27b;
    --auth-sand: #ebdcc6;
    --auth-cream: #f5f1eb;
    --auth-sage: #a6b18a;
    --auth-olive: #6b785e;
    --auth-ink: #3e3228;
    --auth-muted: #71675e;
    --auth-shadow: 0 20px 40px rgba(122, 90, 58, .1);
}

body:has(.auth-board) {
    min-width: 320px;
    background: var(--auth-cream);
}

.auth-page-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0;
}

.auth-board,
.auth-board * {
    box-sizing: border-box;
}

.auth-board {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 86% 9%, rgba(255,255,255,.95) 0 7%, transparent 24%),
        linear-gradient(135deg, #f9f6f1 0%, var(--auth-cream) 55%, #eee6da 100%);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", sans-serif;
    animation: auth-fade-in .4s ease both;
}

.auth-header,
.auth-footer,
.auth-stage {
    position: relative;
    z-index: 2;
    width: min(100% - 96px, 1680px);
    margin-inline: auto;
}

.auth-header {
    display: flex;
    min-height: 104px;
    align-items: center;
    justify-content: space-between;
    padding-block: 22px;
}

.auth-header > p,
.auth-footer p,
.auth-footer span {
    margin: 0 auto;
    color: var(--auth-muted);
    font-size: 16px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-brown);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif;
    font-size: 23px;
    font-weight: 760;
    letter-spacing: -.02em;
    text-decoration: none;
}

.auth-brand strong { color: var(--auth-olive); }

.auth-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: #e4ead9;
}

.auth-brand-mark svg { width: 34px; height: 34px; }
.auth-brand-mark path { fill: none; stroke: var(--auth-olive); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }

.auth-stage {
    display: grid;
    min-height: 780px;
    grid-template-columns: minmax(0, 1.45fr) minmax(420px, .75fr);
    gap: clamp(42px, 5vw, 96px);
    align-items: center;
    padding-block: 18px 28px;
}

.auth-story {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    border-radius: 36px;
    background: #e5e7d8;
    box-shadow: var(--auth-shadow);
    isolation: isolate;
}

.auth-landscape,
.auth-mountains {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-landscape {
    overflow: hidden;
    background: linear-gradient(180deg, #f7e9ce 0%, #e8e5cf 48%, #bcc8ad 100%);
}

.auth-landscape::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,.55), transparent 42%);
    content: "";
}

.auth-sun {
    position: absolute;
    top: 74px;
    right: 15%;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(255, 244, 209, .85);
    box-shadow: 0 0 80px 34px rgba(255, 241, 195, .4);
}

.auth-mountains { z-index: 1; }
.mountain-back { fill: #c7cbb4; }
.mountain-front { fill: #8e9a7d; }
.lake { fill: #aebdae; }
.lake-light { fill: rgba(242, 239, 219, .46); }

.auth-tree {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 15px;
    height: 245px;
    border-radius: 10px 10px 0 0;
    background: #625943;
}

.auth-tree::before,
.auth-tree::after {
    position: absolute;
    left: 50%;
    width: 150px;
    height: 190px;
    border-radius: 49% 51% 46% 54%;
    background: #5f7058;
    content: "";
    transform: translateX(-50%) rotate(10deg);
}

.auth-tree::before { top: -100px; }
.auth-tree::after { top: -23px; left: 15%; width: 112px; height: 132px; background: #74816a; }
.auth-tree--one { left: 5%; transform: scale(.9); transform-origin: bottom; }
.auth-tree--two { right: 5%; height: 285px; transform: scale(1.15); transform-origin: bottom; }
.auth-tree--three { right: 23%; height: 180px; transform: scale(.62); transform-origin: bottom; opacity: .9; }

.auth-leaf {
    position: absolute;
    z-index: 4;
    width: 130px;
    height: 74px;
    border-radius: 100% 0 100% 0;
    background: rgba(107, 120, 94, .7);
}

.auth-leaf--one { top: -22px; left: -30px; transform: rotate(22deg); }
.auth-leaf--two { right: -38px; bottom: 15%; transform: rotate(200deg); }

.auth-story-copy {
    position: relative;
    z-index: 5;
    width: min(620px, 78%);
    padding: clamp(62px, 7vw, 112px);
}

.auth-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--auth-brown-2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .17em;
}

.auth-story-copy h2 {
    margin: 0 0 20px;
    color: #4d4c3e;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif;
    font-size: clamp(42px, 3.4vw, 66px);
    font-weight: 760;
    letter-spacing: -.045em;
    line-height: 1.18;
}

.auth-story-copy p {
    max-width: 440px;
    margin: 0;
    color: #626456;
    font-size: 16px;
    line-height: 1.75;
}

.auth-feature-card {
    position: absolute;
    z-index: 6;
    right: 38px;
    bottom: 34px;
    display: flex;
    width: min(440px, calc(100% - 76px));
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(122, 90, 58, .1);
    border-radius: 28px;
    background: #f8f2e8;
    box-shadow: var(--auth-shadow);
}

.auth-feature-icon {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 18px;
    color: var(--auth-brown);
    background: var(--auth-sand);
    font-size: 24px;
}

.auth-feature-card strong { display: block; margin-bottom: 4px; font-size: 17px; }
.auth-feature-card p { margin: 0; color: var(--auth-muted); font-size: 15px; line-height: 1.55; }

.auth-device {
    position: relative;
    width: min(100%, 506px);
    justify-self: center;
    padding: 16px;
    border: 2px solid rgba(122, 90, 58, .13);
    border-radius: 48px;
    background: #dfd7cc;
    box-shadow: 0 30px 70px rgba(83, 64, 45, .16);
}

.auth-device-speaker {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 50%;
    width: 54px;
    height: 5px;
    border-radius: 999px;
    background: rgba(122, 90, 58, .22);
    transform: translateX(-50%);
}

.auth-form-card {
    padding: 62px 44px 42px;
    border-radius: 34px;
    background: #fffdf9;
}

.auth-form-heading h1 {
    margin: 0 0 10px;
    color: var(--auth-brown);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif;
    font-size: 42px;
    font-weight: 780;
    letter-spacing: -.04em;
}

.auth-form-heading p { margin: 0; color: var(--auth-muted); font-size: 16px; line-height: 1.65; }

.auth-errors {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(163, 70, 58, .2);
    border-radius: 16px;
    color: #8a443b;
    background: #fff2ef;
}

.auth-errors p { margin: 0; font-size: 14px; line-height: 1.5; }
.auth-errors p + p { margin-top: 5px; }

.auth-form { display: grid; gap: 10px; margin-top: 24px; }
.auth-form label { margin-top: 4px; color: #554a40; font-size: 16px; font-weight: 700; }

.auth-form input:not([type="checkbox"]) {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid #dfd1bf;
    border-radius: 18px;
    outline: 0;
    color: var(--auth-ink);
    background: #f8f1e7;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-form input:not([type="checkbox"])::placeholder { color: #9c9083; }
.auth-form input:not([type="checkbox"]):focus { border-color: var(--auth-brown); background: #fffdf9; box-shadow: 0 0 0 4px rgba(166, 124, 82, .18); }

.auth-forgot {
    justify-self: end;
    margin: 2px 2px 4px;
    color: var(--auth-brown);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.auth-primary-button,
.auth-secondary-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 760;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.auth-primary-button { margin-top: 6px; border: 0; color: #fff; background: var(--auth-brown); box-shadow: 0 12px 24px rgba(122, 90, 58, .18); }
.auth-secondary-button { border: 1px solid var(--auth-caramel); color: var(--auth-brown); background: transparent; }
.auth-primary-button:hover { color: #fff; background: var(--auth-brown-2); transform: scale(1.02); }
.auth-secondary-button:hover { color: var(--auth-brown); background: var(--auth-sand); transform: scale(1.02); }
.auth-primary-button:focus-visible, .auth-secondary-button:focus-visible, .auth-forgot:focus-visible, .auth-brand:focus-visible, .auth-account-switch a:focus-visible, .auth-consent a:focus-visible { outline: 3px solid rgba(107,120,94,.4); outline-offset: 3px; }

.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field-row > div { display: grid; gap: 10px; }

.auth-consent { display: flex; align-items: flex-start; gap: 10px; padding-block: 6px; font-weight: 500 !important; line-height: 1.5; }
.auth-consent input { width: 20px; height: 20px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--auth-olive); }
.auth-consent a, .auth-account-switch a { color: var(--auth-brown); font-weight: 760; text-underline-offset: 3px; }
.auth-account-switch { margin: 5px 0 0; text-align: center; color: var(--auth-muted); font-size: 15px; }

.auth-footer {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(122, 90, 58, .12);
}

@keyframes auth-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1260px) {
    .auth-header, .auth-footer, .auth-stage { width: min(100% - 56px, 1180px); }
    .auth-stage { min-height: 700px; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); gap: 36px; }
    .auth-story { min-height: 640px; }
    .auth-story-copy { width: 88%; padding: 66px 54px; }
    .auth-form-card { padding-inline: 36px; }
}

@media (max-width: 900px) {
    .auth-board { overflow: visible; }
    .auth-header, .auth-footer, .auth-stage { width: min(100% - 40px, 680px); }
    .auth-header { min-height: 88px; }
    .auth-header > p { display: none; }
    .auth-stage { min-height: 0; grid-template-columns: 1fr; gap: 24px; padding-block: 6px 32px; }
    .auth-story { min-height: 360px; }
    .auth-story-copy { padding: 50px 42px; }
    .auth-story-copy h2 { font-size: clamp(36px, 7vw, 52px); }
    .auth-story-copy p { display: none; }
    .auth-feature-card { right: 24px; bottom: 22px; }
    .auth-device { width: min(100%, 560px); }
}

@media (max-width: 560px) {
    .auth-board { background: #fffdf9; }
    .auth-header, .auth-footer, .auth-stage { width: 100%; }
    .auth-header { padding: 18px 20px; }
    .auth-brand { font-size: 20px; }
    .auth-brand-mark { width: 42px; height: 42px; }
    .auth-stage { display: block; padding: 0; }
    .auth-story { display: none; }
    .auth-device { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .auth-device-speaker { display: none; }
    .auth-form-card { min-height: calc(100dvh - 160px); padding: 38px 24px 42px; border-radius: 0; }
    .auth-form-heading h1 { font-size: 38px; }
    .auth-field-row { grid-template-columns: 1fr; }
    .auth-footer { min-height: 72px; justify-content: center; padding: 16px 24px; text-align: center; }
    .auth-footer span { display: none; }
    .auth-footer p { font-size: 14px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-board { animation: none; }
    .auth-primary-button, .auth-secondary-button { transition: none; }
}

/* Login screen — Markdown specification ---------------------------------- */

.nature-login-page {
    position: relative;
    display: grid;
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    place-items: center;
    overflow: hidden;
    padding: clamp(28px, 4vh, 54px) 24px;
    color: #3f352d;
    background:
        linear-gradient(rgba(245, 241, 235, .17), rgba(245, 241, 235, .12)),
        url("./img/mood-morning.png") center 48% / cover no-repeat;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Microsoft JhengHei UI", sans-serif;
    isolation: isolate;
    animation: nature-page-in .4s ease both;
}

.nature-login-page::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at center, rgba(245,241,235,.4) 0 22%, transparent 53%);
    content: "";
}

.nature-login-scene {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.nature-table {
    position: absolute;
    right: -4%;
    bottom: -5%;
    left: -4%;
    height: 24%;
    border-top: 10px solid rgba(92, 60, 35, .28);
    background:
        repeating-linear-gradient(4deg, transparent 0 24px, rgba(66,42,25,.09) 25px 27px),
        linear-gradient(100deg, rgba(126,85,50,.88), rgba(166,124,82,.9) 44%, rgba(106,73,46,.9));
    box-shadow: 0 -18px 50px rgba(77, 55, 36, .14);
    transform: perspective(680px) rotateX(6deg);
    transform-origin: bottom;
}

.nature-book {
    position: absolute;
    bottom: 8.5%;
    left: 8%;
    width: clamp(150px, 15vw, 260px);
    height: clamp(32px, 3.2vw, 54px);
    border: 2px solid rgba(122,90,58,.28);
    border-radius: 5px 12px 12px 5px;
    background: #ded5bd;
    box-shadow: 0 14px 24px rgba(67,45,29,.2), inset 0 -7px rgba(122,90,58,.08);
    transform: rotate(5deg);
}

.nature-book::before {
    position: absolute;
    right: 10%;
    bottom: 100%;
    width: 78%;
    height: 14px;
    border-radius: 4px 9px 0 0;
    background: #f1eadc;
    content: "";
}

.nature-cup {
    position: absolute;
    right: 12%;
    bottom: 8%;
    width: clamp(74px, 7vw, 116px);
    height: clamp(58px, 5.4vw, 88px);
    border: 3px solid rgba(122,90,58,.32);
    border-radius: 10px 10px 28px 28px;
    background: #eee5d6;
    box-shadow: 0 13px 25px rgba(67,45,29,.24), inset 0 8px #f7f2e9;
}

.nature-cup::before {
    position: absolute;
    top: 12%;
    left: 12%;
    width: 76%;
    height: 18%;
    border-radius: 50%;
    background: #7a5a3a;
    box-shadow: inset 0 3px 5px rgba(35,23,16,.35);
    content: "";
}

.nature-cup::after {
    position: absolute;
    top: 24%;
    left: 94%;
    width: 38%;
    height: 48%;
    border: 7px solid #ddd1bf;
    border-left: 0;
    border-radius: 0 50% 50% 0;
    content: "";
}

.nature-cup i,
.nature-cup i::before {
    position: absolute;
    bottom: 110%;
    left: 38%;
    width: 2px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.72);
    content: "";
    transform: rotate(8deg);
}

.nature-cup i::before { bottom: -2px; left: 13px; height: 29px; transform: rotate(-16deg); }

.nature-plant {
    position: absolute;
    bottom: 12%;
    left: 2.5%;
    width: 84px;
    height: 150px;
}

.nature-plant b {
    position: absolute;
    bottom: 0;
    left: 17px;
    width: 54px;
    height: 50px;
    border-radius: 8px 8px 20px 20px;
    background: #c9a27b;
    box-shadow: 0 12px 20px rgba(75,48,30,.18);
}

.nature-plant i {
    position: absolute;
    z-index: 1;
    bottom: 42px;
    left: 39px;
    width: 42px;
    height: 70px;
    border-radius: 100% 0 100% 0;
    background: #6b785e;
    transform-origin: bottom left;
}

.nature-plant i:nth-child(1) { transform: rotate(-52deg) scale(.86); }
.nature-plant i:nth-child(2) { transform: rotate(-20deg) translateY(-30px) scale(.72); }
.nature-plant i:nth-child(3) { transform: rotate(34deg) translate(2px,-25px) scale(.8); }
.nature-plant i:nth-child(4) { transform: rotate(70deg) scale(.78); }

.nature-login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: clamp(30px, 4vh, 44px) 44px 32px;
    border: 1px solid rgba(201, 162, 123, .42);
    border-radius: 28px;
    background: #fffdf9;
    box-shadow: 0 20px 40px rgba(122,90,58,.1), 0 3px 12px rgba(122,90,58,.08);
}

.nature-brand {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    margin: 0 auto 26px;
    color: #493a2e;
    text-align: left;
    text-decoration: none;
}

.nature-brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: #e5eadb;
}

.nature-brand-mark svg { width: 38px; height: 38px; }
.nature-brand-mark path { fill: none; stroke: #6b785e; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.nature-brand strong, .nature-brand small { display: block; }
.nature-brand strong { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif; font-size: 20px; letter-spacing: .08em; }
.nature-brand small { margin-top: 1px; color: #6f6257; font-size: 16px; font-weight: 650; }

.nature-login-heading { text-align: center; }
.nature-login-heading > span { display: block; margin-bottom: 7px; color: #6b785e; font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.nature-login-heading h1 { margin: 0; color: #7a5a3a; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif; font-size: 40px; font-weight: 780; letter-spacing: -.04em; line-height: 1.2; }
.nature-login-heading p { margin: 10px 0 0; color: #6f6257; font-size: 18px; line-height: 1.6; }

.nature-form-errors {
    margin-top: 18px;
    padding: 11px 14px;
    border: 1px solid rgba(153,68,57,.2);
    border-radius: 14px;
    color: #8b4439;
    background: #fff2ef;
    font-size: 16px;
    text-align: center;
}

.nature-login-form { display: grid; gap: 14px; margin-top: 24px; }
.nature-field { display: grid; gap: 8px; }
.nature-field label { color: #493e35; font-size: 16px; font-weight: 700; }
.nature-field-control { position: relative; display: block; }
.nature-field-control > svg { position: absolute; z-index: 1; top: 50%; left: 18px; width: 21px; height: 21px; fill: none; stroke: #6b785e; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; transform: translateY(-50%); pointer-events: none; }

.nature-login-form input:not([type="hidden"]) {
    width: 100%;
    height: 56px;
    padding: 0 54px 0 52px;
    border: 1px solid #ebdcc6;
    border-radius: 18px;
    outline: 0;
    color: #3f352d;
    background: #fff;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.nature-login-form input::placeholder { color: #9a8d81; opacity: 1; }
.nature-login-form input:focus { border-color: #a67c52; box-shadow: 0 0 0 4px rgba(166,124,82,.18); }
.nature-login-form input:-webkit-autofill { -webkit-text-fill-color: #3f352d; box-shadow: 0 0 0 1000px #fff inset; transition: background-color 9999s; }

.nature-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #6b785e;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.nature-password-toggle:hover { background: #f5f1eb; }
.nature-password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nature-forgot { justify-self: end; margin-top: -2px; color: #6b785e; font-size: 16px; font-weight: 650; text-decoration: none; }
.nature-forgot:hover { color: #7a5a3a; text-decoration: underline; text-underline-offset: 3px; }

.nature-primary,
.nature-secondary {
    display: flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 760;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.nature-primary { border: 0; color: #fff; background: #7a5a3a; box-shadow: 0 12px 24px rgba(122,90,58,.18); }
.nature-primary:hover { color: #fff; background: #a67c52; transform: scale(1.02); }
.nature-secondary { border: 1px solid #c9a27b; color: #7a5a3a; background: #fff; }
.nature-secondary:hover { color: #7a5a3a; background: #f5f1eb; transform: scale(1.02); }

.nature-divider { display: flex; align-items: center; gap: 13px; color: #7f7369; font-size: 16px; }
.nature-divider::before, .nature-divider::after { height: 1px; flex: 1; background: #d8ccbe; content: ""; }

.nature-care-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 23px 0 0;
    color: #6b785e;
    font-size: 16px;
    font-weight: 650;
}

.nature-care-message svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

@keyframes nature-page-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
    .nature-login-page { background-position: center 44%; }
    .nature-login-card { width: min(100%, 500px); }
    .nature-book { left: 3%; }
    .nature-cup { right: 7%; }
}

@media (max-width: 600px) {
    .nature-login-page { min-height: 100dvh; align-items: start; overflow: auto; padding: 18px 14px 110px; background-position: center top; }
    .nature-login-page::before { background: rgba(245,241,235,.18); }
    .nature-login-card { width: 100%; padding: 28px 22px 26px; border-radius: 28px; }
    .nature-brand { margin-bottom: 22px; }
    .nature-brand-mark { width: 48px; height: 48px; }
    .nature-login-heading h1 { font-size: 40px; }
    .nature-login-heading p { font-size: 16px; }
    .nature-table { height: 13%; }
    .nature-book, .nature-cup, .nature-plant { display: none; }
}

@media (max-height: 820px) and (min-width: 601px) {
    .nature-login-page { padding-block: 18px; }
    .nature-login-card { padding: 24px 38px 22px; }
    .nature-brand { margin-bottom: 15px; }
    .nature-brand-mark { width: 44px; height: 44px; }
    .nature-brand-mark svg { width: 32px; height: 32px; }
    .nature-login-heading p { margin-top: 6px; font-size: 16px; }
    .nature-login-form { gap: 10px; margin-top: 17px; }
    .nature-login-form input:not([type="hidden"]), .nature-primary, .nature-secondary { height: 52px; }
    .nature-care-message { margin-top: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .nature-login-page { animation: none; }
    .nature-primary, .nature-secondary { transition: none; }
}

/* Shared Home Hero authentication screens -------------------------------- */

.auth-hero-page {
    width: min(100%, 390px);
    max-width: 390px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    background: var(--mf-neutral-100);
    box-shadow: none;
    animation: auth-hero-fade-in .4s ease both;
}

.auth-hero-page .auth-shared-hero {
    width: 100%;
    min-height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
}

.auth-hero-page .moodfood-hero-image {
    object-fit: cover;
    object-position: center;
}

.auth-hero-form-wrap {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 32px 20px;
}

.auth-hero-card {
    width: min(100%, 500px);
    padding: 36px 40px 32px;
    border: 1px solid rgba(235, 220, 198, .86);
    border-radius: 28px;
    color: #40362d;
    background: #fffdf9;
    box-shadow: 0 12px 24px rgba(122,90,58,.12);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Microsoft JhengHei UI", sans-serif;
}

.auth-hero-card--register { width: min(100%, 580px); }

.auth-hero-brand {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 11px;
    margin: 0 auto 22px;
    color: #493b30;
    text-decoration: none;
}

.auth-hero-logo {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 50%;
    background: #e6ebdc;
}

.auth-hero-logo svg { width: 36px; height: 36px; }
.auth-hero-logo path { fill: none; stroke: #6b785e; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.auth-hero-brand strong, .auth-hero-brand small { display: block; }
.auth-hero-brand strong { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif; font-size: 20px; font-weight: 780; letter-spacing: .08em; }
.auth-hero-brand small { margin-top: 1px; color: #6b785e; font-size: 16px; font-weight: 650; }

.auth-hero-heading { text-align: center; }
.auth-hero-heading > span { display: block; margin-bottom: 6px; color: #6b785e; font-size: 13px; font-weight: 800; letter-spacing: .17em; }
.auth-hero-heading h1 { margin: 0; color: #7a5a3a; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif; font-size: 34px; font-weight: 780; letter-spacing: -.04em; line-height: 1.2; }
.auth-hero-heading p { margin: 9px 0 0; color: #6f6257; font-size: 16px; line-height: 1.6; }

.auth-hero-errors {
    margin-top: 15px;
    padding: 11px 14px;
    border: 1px solid rgba(158,71,59,.22);
    border-radius: 14px;
    color: #8b4439;
    background: #fff2ef;
    font-size: 16px;
    text-align: left;
}

.auth-hero-errors p { margin: 0; }
.auth-hero-errors p + p { margin-top: 4px; }

.auth-hero-messages {
    margin-top: 15px;
    padding: 11px 14px;
    border: 1px solid rgba(107,120,94,.28);
    border-radius: 14px;
    color: #536149;
    background: #f1f5eb;
    font-size: 16px;
}

.auth-hero-messages p { margin: 0; }

.auth-hero-form { display: grid; gap: 13px; margin-top: 22px; }
.auth-hero-field { display: grid; gap: 7px; min-width: 0; }
.auth-hero-field label { color: #493e35; font-size: 16px; font-weight: 700; }
.auth-hero-control { position: relative; display: block; min-width: 0; }
.auth-hero-control > svg { position: absolute; z-index: 1; top: 50%; left: 18px; width: 21px; height: 21px; fill: none; stroke: #6b785e; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; transform: translateY(-50%); pointer-events: none; }

.auth-hero-form input:not([type="checkbox"]):not([type="hidden"]) {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 20px;
    border: 1px solid #ebdcc6;
    border-radius: 18px;
    outline: 0;
    color: #40362d;
    background: #fff;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-hero-form .auth-hero-control input:not([type="hidden"]) { padding-right: 52px; padding-left: 74px; }
.auth-hero-form input::placeholder { color: #998d81; opacity: 1; }
.auth-hero-form input:focus { border-color: #a67c52; box-shadow: 0 0 0 4px rgba(166,124,82,.18); }
.auth-hero-form input:-webkit-autofill { -webkit-text-fill-color: #40362d; box-shadow: 0 0 0 1000px #fff inset; transition: background-color 9999s; }

.auth-hero-eye {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #6b785e;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.auth-hero-eye:hover { background: #f5f1eb; }
.auth-hero-eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-hero-forgot { justify-self: end; margin-top: -3px; color: #6b785e; font-size: 16px; font-weight: 650; text-decoration: none; }
.auth-hero-forgot:hover { color: #7a5a3a; text-decoration: underline; text-underline-offset: 3px; }

.auth-hero-primary,
.auth-hero-secondary {
    display: flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang TC", sans-serif;
    font-size: 18px;
    font-weight: 730;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.auth-hero-primary { border: 0; color: #fff; background: #7a5a3a; box-shadow: 0 12px 24px rgba(122,90,58,.18); }
.auth-hero-primary:hover { color: #fff; background: #a67c52; transform: scale(1.02); }
.auth-hero-secondary { border: 1px solid #c9a27b; color: #7a5a3a; background: #fff; }
.auth-hero-secondary:hover { color: #7a5a3a; background: #f5f1eb; transform: scale(1.02); }

.auth-hero-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-hero-consent { display: flex; align-items: flex-start; gap: 10px; color: #4f443a; font-size: 16px; line-height: 1.5; }
.auth-hero-consent input { width: 20px; height: 20px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #6b785e; }

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

@media (max-width: 700px) {
    .auth-hero-form-wrap { align-items: start; padding: 24px; }
    .auth-hero-card { padding: 24px 20px; }
    .auth-hero-card--register { padding-top: 24px; }
    .auth-hero-form-row { grid-template-columns: 1fr; }
    .auth-hero-page .auth-shared-hero { min-height: 100dvh; }
}

@media (max-height: 820px) and (min-width: 701px) {
    .auth-hero-form-wrap { align-items: start; padding-block: 18px; }
    .auth-hero-card { padding-block: 24px 22px; }
    .auth-hero-brand { margin-bottom: 14px; }
    .auth-hero-logo { width: 44px; height: 44px; }
    .auth-hero-logo svg { width: 32px; height: 32px; }
    .auth-hero-form { gap: 10px; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero-page { animation: none; }
    .auth-hero-primary, .auth-hero-secondary { transition: none; }
}

/* MoodFood AI Mobile UI Guideline v1.0 · authentication normalization */
.auth-hero-page {
    width: 100%;
    max-width: 390px;
    min-height: 100dvh;
}

.auth-hero-form-wrap {
    padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}

.auth-hero-card {
    width: 100%;
    padding: 24px;
    border-radius: 24px;
}

.auth-hero-control > svg,
.auth-hero-eye svg {
    width: 24px;
    height: 24px;
}

.auth-hero-eye {
    width: 48px;
    height: 48px;
    right: 4px;
}

.moodfood-page.auth-hero-page .auth-hero-card--login .auth-hero-form .auth-hero-control input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]) {
    padding-right: 56px;
    padding-left: 74px;
}

.auth-hero-primary,
.auth-hero-secondary {
    min-height: 56px;
}

@media (max-width: 360px) {
    .auth-hero-form-wrap { padding-inline: 24px; }
    .auth-hero-card { padding-inline: 24px; }
}
