@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:200,400,700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100dvh;
    font-family: 'Nunito Sans', arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #353535;
    background: #fff;
    -webkit-text-size-adjust: 100%;
}

body.pwa-login,
body.pwa-login #wrapper {
    background: #fff;
    min-height: 100dvh;
    overflow-x: hidden;
}

.login {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 22px calc(28px + env(safe-area-inset-bottom, 0px));
    max-width: 430px;
    margin: 0 auto;
}

.login-head {
    padding: 8px 0 20px;
}

.login-logo {
    width: 96px;
    height: 44px;
    background: url('/img/logo_2iyo_basic_small.png') left center no-repeat;
    background-size: contain;
}

.login-dots {
    display: flex;
    gap: 8px;
    margin: 0 0 22px;
}

.login-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e4e7e6;
}

.login-dots span.is-on {
    background: #263F3B;
    width: 22px;
    border-radius: 8px;
}

.login-panel {
    background: #fff;
    border-radius: 16px;
    padding: 22px 0 20px;
}

.login-panel[hidden] {
    display: none !important;
}

.login-panel h1 {
    margin: 0 0 10px;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #263F3B;
}

.login-sub {
    margin: 0 0 22px;
    min-height: 0;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.45;
    color: #5c5c5c;
}

.login-label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #767676;
}

.login-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 52px;
    margin: 0 0 16px;
    padding: 0 16px;
    font-size: 17px;
    font-family: inherit;
    color: #353535;
    background: #f8fafb;
    border: 1px solid #f1f2f4;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.login-input:focus {
    border-color: #00519E;
    background: #fff;
}

.login-phone {
    display: flex;
    gap: 8px;
    margin: 0 0 8px;
}

.login-phone .custom-select-container {
    position: relative;
    flex: 0 0 92px;
}

.login-phone #prefix_display {
    margin-bottom: 14px;
    text-align: center;
    font-weight: 700;
    color: #263F3B;
}

.login-phone #tlf {
    flex: 1 1 auto;
    min-width: 0;
}

.login-code {
    height: 56px;
    text-align: center;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.45rem;
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: auto;
    top: 54px;
    width: min(86vw, 320px);
    max-height: 42vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #f1f2f4;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    z-index: 20;
}

.custom-option {
    padding: 12px 14px;
    font-size: 0.95rem;
    color: #353535;
    cursor: pointer;
}

.custom-option:hover,
.custom-option.active {
    background: #f8fafb;
    color: #00519E;
}

#cf-turnstile-container {
    min-height: 0;
    margin: 4px 0 8px;
}

#cf-turnstile-container > div {
    max-width: 100%;
}

.login-btn {
    display: block;
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    background: #00519E;
    color: #fff;
    font-size: 1.12rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.login-btn:disabled {
    background: #c5d0cc;
    cursor: not-allowed;
}

.login-sub.text-success { color: #1e7a46; }
.login-sub.text-error { color: #c0392b; }
.login-input.input-error { border-color: #c0392b; color: #c0392b; }

.login-beta-code {
    margin: -8px 0 16px;
    padding: 12px 14px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #00519E;
    background: #eef4fb;
    border-radius: 12px;
}

#betatester-sms-pop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(38, 63, 59, 0.45);
}

#betatester-sms-pop[hidden] {
    display: none !important;
}

.login-beta-card {
    box-sizing: border-box;
    width: min(100%, 360px);
    padding: 24px 22px 20px;
    background: #fff;
    border-radius: 16px;
}

.login-beta-label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #767676;
}

.login-beta-value {
    margin: 0 0 18px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #263F3B;
}

@media (min-width: 480px) {
    .login {
        padding-top: calc(36px + env(safe-area-inset-top, 0px));
    }
}

body.pwa-consent,
body.pwa-consent #wrapper {
    height: 100dvh;
    overflow: hidden;
}

.login-legal {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 430px;
    padding-bottom: 0;
    overflow: hidden;
}

.login-legal .login-head {
    flex: 0 0 auto;
}

.login-legal h1 {
    flex: 0 0 auto;
    margin: 0 0 8px;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #263F3B;
}

.login-legal > .login-sub {
    flex: 0 0 auto;
    margin-bottom: 12px;
    font-size: 0.98rem;
}

.login-legal .pwa-scrollbox {
    margin: 0 0 4px;
}

.legal-doc h2 {
    margin: 1.15em 0 0.35em;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #263F3B;
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-doc p,
.legal-doc ul {
    margin: 0 0 0.75em;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #5c5c5c;
}

.legal-doc ul {
    padding-left: 1.1em;
}

.legal-doc a {
    color: #00519E;
}

.legal-foot {
    flex: 0 0 auto;
    padding: 10px 0 calc(18px + env(safe-area-inset-bottom, 0px));
    background: #fff;
}

.legal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #353535;
    cursor: pointer;
}

.legal-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: #00519E;
}

.legal-foot .login-btn {
    margin-top: 0;
}
