/* Authentication screens. Keep form styles local to this layout. */
.loom-auth { background: #f7f8f3; color: #142426; }
.loom-auth .navbar { background: #111e20 !important; border-bottom: 1px solid #ffffff18; }
.loom-auth .navbar .nav-link { color: #e1e7e3; }
.loom-auth .navbar .nav-link:hover { color: #d1ef83; }
.loom-auth .footer { background: #111e20 !important; }
.loom-auth main { padding: 0; }
.auth-shell {
    --auth-ink: #142426;
    --auth-muted: #62716b;
    --auth-lime: #d1ef83;
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    width: min(1120px, calc(100% - 64px));
    margin: 48px auto 64px;
    border: 1px solid #dfe5da;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px #1424260b;
    font-family: Arial, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.7;
}
.auth-shell *, .auth-shell *::before, .auth-shell *::after { box-sizing: border-box; }
.auth-shell [hidden] { display: none !important; }
.auth-shell a { color: #31584a; text-underline-offset: 4px; }
.auth-shell a:hover { color: #142426; }
.auth-shell :is(a, button, input, summary):focus-visible { outline: 3px solid #799d33; outline-offset: 4px; }
.auth-story {
    min-width: 0;
    padding: 46px 40px 32px;
    border-radius: 23px 0 0 23px;
    background: #142a29;
    color: #fff;
    overflow: hidden;
}
.auth-story-inner { position: sticky; top: 36px; }
.auth-eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 34px; color: #b6c9c0; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.auth-eyebrow > span { width: 6px; height: 6px; background: var(--auth-lime); border-radius: 50%; }
.auth-story h2 { margin: 0; font-size: clamp(30px, 3.1vw, 43px); font-weight: 800; line-height: 1.5; letter-spacing: -.05em; }
.auth-story h2 em { color: var(--auth-lime); font-style: normal; }
.auth-story-copy { margin: 22px 0 0; font-size: 13px; line-height: 2; color: #c0d0c7; }
.auth-art { position: relative; max-width: 350px; margin: 48px auto 40px; padding: 15px 12px 32px; }
.auth-orbit { position: absolute; inset: -20px -45px; border: 1px solid #d1ef8317; border-radius: 50%; transform: rotate(-25deg); }
.auth-orbit::after { content: ''; position: absolute; inset: 25px -25px; border: 1px solid #d1ef8312; border-radius: 50%; }
.auth-art-sheet { position: relative; padding: 16px; background: #fcfdf8; border-radius: 7px; transform: rotate(-5deg); box-shadow: 0 15px 30px #0002; color: #253b32; }
.auth-art-sheet-back { position: absolute; inset: 12px 8px 35px; background: #a4ba89; transform: rotate(4deg); }
.auth-art-top { display: flex; justify-content: space-between; align-items: center; font-size: 7px; font-weight: 700; letter-spacing: 1px; padding-bottom: 13px; }
.auth-art-top > span:last-child { font-size: 16px; }
.auth-art-cover { position: relative; display: flex; justify-content: space-between; align-items: end; overflow: hidden; min-height: 133px; padding: 22px 16px; background: #e0edbc; }
.auth-art-cover::before { content: ''; position: absolute; width: 180px; height: 180px; border: 22px solid #c4d99b; box-shadow: 0 0 0 18px #d4e4af; border-radius: 50%; right: -100px; top: -48px; }
.auth-art-cover > span { position: relative; font-size: 23px; font-weight: 800; letter-spacing: -.05em; line-height: 1.45; }
.auth-art-action { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #ffffffe0; font-size: 16px; }
.auth-art-line { display: flex; align-items: center; gap: 9px; padding: 16px 0 12px; font-size: 9px; }
.auth-art-line > span { color: #6f8465; font-size: 8px; }
.auth-art-line > span:last-child { margin-left: auto; }
.auth-art-services { display: flex; gap: 6px; }
.auth-art-services > span { flex: 1; padding: 5px 2px; border-radius: 3px; background: #edf2e4; color: #506545; font-size: 8px; text-align: center; }
.auth-art-tag { position: absolute; bottom: 0; right: 0; display: flex; align-items: center; gap: 9px; padding: 12px 16px; background: #f2f6e8; color: #40553c; border-radius: 6px; transform: rotate(3deg); box-shadow: 0 8px 25px #0002; font-size: 10px; }
.auth-art-tag > span { font-size: 22px; color: #70934b; line-height: 1; }
.auth-story-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #ffffff1c; padding-top: 22px; color: #a4baad; font-size: 8px; letter-spacing: 1px; }
.auth-panel { min-width: 0; padding: 44px 48px; align-self: center; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-header .auth-eyebrow { color: #64785c; margin-bottom: 10px; }
.auth-form-header h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.04em; font-weight: 800; line-height: 1.4; color: #142426; }
.auth-form-header > p:last-child { margin: 0; font-size: 13px; color: var(--auth-muted); }
.auth-field { margin-bottom: 18px; min-width: 0; }
.auth-field > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: #293e34; }
.auth-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-input-wrap { position: relative; }
.auth-shell .auth-input {
    display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #ced8c9; border-radius: 8px;
    background: #fbfcf9; color: #142426; font: inherit; font-size: 16px; line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
}
.auth-shell .auth-input::placeholder { color: #7b877f; font-size: 14px; }
.auth-shell .auth-input:focus { border-color: #6e9045; outline: none; box-shadow: 0 0 0 3px #8cad5324; background: #fff; }
.auth-shell .auth-input[aria-invalid="true"] { border-color: #b13d34; }
.auth-password .auth-input { padding-right: 66px; }
.auth-password-toggle { position: absolute; top: 3px; right: 4px; min-width: 52px; min-height: 42px; border: 0; border-radius: 5px; background: transparent; color: #46613d; font-size: 12px; font-weight: 700; cursor: pointer; }
.auth-password-toggle:hover { background: #edf3e4; }
.auth-hint { margin: 6px 0 0; color: #62716b; font-size: 11px; line-height: 1.7; }
.auth-shell .auth-error { margin: 7px 0 0; color: #ae342e; font-size: 12px; line-height: 1.65; }
.auth-form-error { padding: 12px 14px; margin-bottom: 18px; border: 1px solid #edc5bd; border-radius: 8px; background: #fff4f1; color: #9f3129; font-size: 13px; }
.auth-banner { padding: 14px 16px; border: 1px solid #d8e3cb; border-radius: 9px; background: #f1f6e9; margin-bottom: 18px; overflow-wrap: anywhere; }
.auth-banner strong { font-size: 13px; color: #355335; }
.auth-banner p { margin: 5px 0 0; font-size: 12px; color: #55664f; }
.auth-referral { border-top: 1px solid #e4e9df; border-bottom: 1px solid #e4e9df; padding: 13px 0; margin: 22px 0; }
.auth-referral summary { cursor: pointer; color: #455c40; font-size: 12px; font-weight: 700; }
.auth-referral .auth-field { margin: 12px 0 0; }
.auth-consent { border: 0; padding: 0; margin: 22px 0; }
.auth-consent legend { float: none; width: auto; padding: 0; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.auth-check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin: 12px 0; }
.auth-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #365a43; cursor: pointer; }
.auth-check label { font-size: 12px; line-height: 1.9; cursor: pointer; }
.auth-check .auth-error { grid-column: 2; margin: 0; }
.auth-submit {
    display: block; width: 100%; min-height: 52px; padding: 14px 20px; border: 1px solid #c3df80; border-radius: 8px;
    background: var(--auth-lime); color: #182d25; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
    transition: background .15s; overflow-wrap: anywhere;
}
.auth-submit:hover { background: #c5e574; }
.auth-submit:disabled { background: #e2e9d6; border-color: #dce4d1; color: #5c6b50; cursor: wait; }
.auth-forgot { text-align: right; margin: -2px 0 24px; font-size: 12px; }
.auth-switch { margin: 25px 0 0; padding-top: 22px; border-top: 1px solid #e4e9df; text-align: center; color: #62716b; font-size: 12px; }
.auth-switch a { display: inline-block; margin-left: 6px; font-weight: 700; }
.auth-strength { margin: -8px 0 18px; }
.auth-strength-track { height: 3px; background: #e9ede4; border-radius: 3px; }
.auth-strength-track span { display: block; height: 100%; border-radius: 3px; }
.auth-strength[data-strength="weak"] .auth-strength-track span { width: 33%; background: #af7235; }
.auth-strength[data-strength="medium"] .auth-strength-track span { width: 66%; background: #7f8a43; }
.auth-strength[data-strength="strong"] .auth-strength-track span { width: 100%; background: #4d7c42; }
@media (max-width: 1000px) {
    .auth-shell { width: calc(100% - 40px); }
    .auth-story { padding: 36px 26px 28px; }
    .auth-panel { padding: 36px 28px; }
    .auth-story h2 { font-size: 31px; }
}
@media (max-width: 767px) {
    .auth-shell { grid-template-columns: 1fr; width: min(560px, calc(100% - 32px)); margin: 24px auto 40px; border-radius: 18px; }
    .auth-story { padding: 23px 26px; border-radius: 17px 17px 0 0; }
    .auth-story-inner { position: static; }
    .auth-story .auth-eyebrow { margin-bottom: 10px; font-size: 9px; }
    .auth-story h2 { font-size: 24px; line-height: 1.55; }
    .auth-story h2 br:first-child { display: none; }
    .auth-story-copy, .auth-art, .auth-story-footer { display: none; }
    .auth-panel { padding: 28px 24px; }
    .auth-form-header { margin-bottom: 22px; }
    .auth-form-header h1 { font-size: 25px; }
    .auth-name-grid { gap: 12px; }
}
@media (max-width: 360px) {
    .auth-panel { padding: 26px 18px; }
    .auth-story { padding: 22px 18px; }
    .auth-name-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-shell * { transition: none !important; }
}
