@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/barlow-condensed-latin-700.woff2") format("woff2");
}

* { box-sizing: border-box; }
:root {
    --primary: #214c87;
    --primary-dark: #173255;
    --gold: #bd9b5d;
    --text-dark: #173255;
    --text-light: #506177;
    --border: #bac5d1;
    --paper: #f5f3ee;
}
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
    font-family: "Noto Sans JP", "Yu Gothic", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    background: var(--paper);
    isolation: isolate;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(245,243,238,.64), rgba(245,243,238,0) 22%), linear-gradient(90deg, rgba(245,243,238,.12) 0%, rgba(245,243,238,.12) 42%, rgba(245,243,238,.9) 73%, rgba(245,243,238,.98) 100%), url("bg.jpg") center / cover no-repeat;
    pointer-events: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.page-width { width: min(1376px, calc(100% - 96px)); margin-inline: auto; }
.login-header {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(23,50,85,.55);
}
.club-mark { display: flex; align-items: center; gap: 14px; }
.club-mark img { width: 55px; height: 55px; object-fit: contain; background: transparent; }
.club-mark-name { font: 700 40px/.9 "Barlow Condensed", "Arial Narrow", sans-serif; }
.club-mark-name small { display: block; margin-top: 8px; font: 600 9px/1.2 Arial, sans-serif; letter-spacing: .14em; }
.language-selector { display: flex; gap: 22px; }
.language-btn {
    min-height: 44px;
    padding: 9px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--text-dark);
    font-size: 14px;
    position: relative;
}
.language-btn.active { font-weight: 700; }
.language-btn.active::after { content: ""; position: absolute; bottom: 4px; left: 0; right: 0; height: 2px; background: var(--primary); }
.language-btn:disabled { cursor: wait; }
.login-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    gap: 7vw;
    align-items: center;
    padding-block: 52px;
}
.club-signature { align-self: end; padding-bottom: 4px; }
.app-download { max-width: 390px; margin: 0 0 28px; padding: 21px 22px 18px; border-top: 1px solid var(--gold); background: #fff; }
.app-download-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.6; }
.app-download-description { margin: 0 0 18px; font-size: 12px; line-height: 1.8; color: var(--text-light); }
.app-platforms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; position: relative; }
.app-platforms::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #e6e9ed; }
.app-platform { min-width: 0; text-align: center; }
.app-platform-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; line-height: 1.6; }
.app-qr-link { display: block; width: 135px; height: 135px; margin: 0 auto 14px; background: white; }
.app-qr-link img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.app-store-link { display: flex; align-items: center; justify-content: center; gap: 6px; height: 56px; min-height: 56px; padding: 9px 8px; border: 1px solid var(--primary); border-radius: 3px; background: var(--primary); color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.4; transition: background .15s, box-shadow .15s; }
.app-store-link:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 2px 6px #17325526; }
.app-store-link:active { box-shadow: none; }
.app-store-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; white-space: nowrap; }
.app-store-arrow { font-size: 17px; line-height: 1; flex: none; }
.app-download-note { margin: 16px 0 0; font-size: 11px; line-height: 1.8; text-align: center; color: var(--text-light); }
.club-wordmark { margin: 0; font: 700 clamp(44px, 5vw, 68px)/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: -.015em; }
.club-name { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: 18px; font-weight: 600; }
.club-name::before { content: ""; width: 12px; height: 12px; background: var(--gold); flex: none; }
.login-container { width: 100%; }
.login-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
h1 { margin: 0 0 32px; font-size: clamp(36px, 3.8vw, 50px); font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.form-group input {
    width: 100%;
    min-height: 54px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(255,255,255,.97);
    color: var(--text-dark);
    font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input::placeholder { color: #667589; opacity: 1; }
.form-group input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(33,76,135,.13); }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 46px; height: 46px; padding: 12px; border: 0; border-radius: 2px; color: var(--primary-dark); background: transparent; }
.password-toggle svg { display: block; width: 22px; height: 22px; }
.password-eye-line { opacity: 0; }
.password-toggle[aria-pressed="true"] .password-eye-line { opacity: 1; }
.terms-row { margin: 26px 0; }
.terms-label { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.8; }
.terms-label input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--primary); flex: none; }
.terms-label a { font-weight: 600; }
.terms-label a:hover { color: var(--primary); }
.btn { min-height: 50px; padding: 13px 22px; border: 0; border-radius: 2px; font-size: 16px; font-weight: 600; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.login-submit { display: flex; align-items: stretch; width: 100%; min-height: 56px; padding: 0; transition: background .15s; }
.submit-label { flex: 1; display: grid; place-items: center; padding: 14px 20px; }
.submit-arrow { display: grid; place-items: center; width: 62px; background: #d0b476; color: var(--primary-dark); }
.submit-arrow svg { width: 26px; height: 26px; }
.login-submit:disabled { background: #526f94; cursor: not-allowed; }
.login-submit:disabled .submit-arrow { background: #d4c29c; }
.login-footer { display: flex; align-items: center; gap: 24px; justify-content: space-between; min-height: 74px; padding-block: 18px; font-size: 12px; }
.footer-rule { flex: 1; height: 1px; background: var(--gold); }
.login-footer p { margin: 0; }
.messages:empty { display: none; }
.message { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #a5b1c0; border-radius: 2px; background: rgba(255,255,255,.96); font-size: 14px; overflow-wrap: anywhere; }
.message.error { border-color: #ba6868; color: #912b2b; }
.message.success { border-color: #729985; color: #255e43; }
dialog { color: var(--text-dark); background: white; }
dialog::backdrop { background: rgba(23,50,85,.45); }

@media (max-width: 960px) {
    .page-width { width: calc(100% - 48px); }
    .login-main { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
    .club-name { font-size: 15px; }
}
@media (max-width: 700px) {
    body::before { background: linear-gradient(180deg, rgba(245,243,238,.72) 0%, rgba(245,243,238,.82) 27%, rgba(245,243,238,.94) 77%, rgba(245,243,238,.85) 100%), url("bg.jpg") 38% center / cover no-repeat; }
    .page-width { width: calc(100% - 40px); }
    .login-header { min-height: 90px; gap: 14px; }
    .club-mark { gap: 9px; }
    .club-mark img { width: 40px; height: 40px; }
    .club-mark-name { font-size: 30px; }
    .club-mark-name small { font-size: 7px; letter-spacing: .08em; }
    .language-selector { gap: 14px; }
    .language-btn { font-size: 13px; }
    .login-main { display: flex; flex-direction: column; align-items: stretch; gap: 42px; padding-block: 44px 28px; }
    .login-container { order: -1; max-width: 420px; align-self: center; }
    .login-eyebrow { margin-bottom: 12px; font-size: 12px; }
    h1 { margin-bottom: 28px; font-size: 36px; }
    .form-group { margin-bottom: 22px; }
    .terms-row { margin: 22px 0; }
    .club-signature { align-self: stretch; padding: 0; }
    .app-download { max-width: none; margin-bottom: 30px; padding: 21px 14px 18px; }
    .app-platforms { gap: 16px; }
    .club-wordmark { font-size: 36px; }
    .club-name { margin-top: 8px; font-size: 14px; }
    .club-name::before { width: 9px; height: 9px; }
    .login-footer { min-height: 56px; padding-block: 12px 18px; gap: 16px; }
}
@media (min-width: 701px) and (max-width: 960px) {
    .app-download { padding-inline: 14px; }
    .app-platforms { gap: 16px; }
    .app-qr-link { width: 90px; height: 90px; }
    .app-store-link { padding-inline: 4px; }
}
@media (max-width: 380px) {
    .app-qr-link { width: 90px; height: 90px; }
}
@media (max-width: 360px) {
    .page-width { width: calc(100% - 32px); }
    .club-mark-name { display: none; }
    .login-main { padding-top: 32px; }
    .terms-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

@media (min-width: 701px) and (max-height: 780px) {
    .login-main { padding-block: 28px; }
}
