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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #e8edf2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== Header ========== */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    padding: 10px;
    width: 100%;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
}

.logo-icon {
    height: 42px;
    width: 42px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #292524;
}

/* ========== Contents ========== */
.contents {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding: 0 16px;
    width: 100%;
    flex-shrink: 0;
}

.container {
    background-color: #fafafa;
    border: 1px solid #9f9fa9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    max-width: 480px;
    padding: 16px;
    width: 100%;
}

/* ========== Page Title ========== */
.page-title {
    width: 100%;
}

.page-title p {
    font-size: 24px;
    font-weight: 700;
    color: #292524;
    text-align: center;
    line-height: 1.2;
}

/* ========== Signup Section ========== */
.signup {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
}

/* ========== Link Text ========== */
.link-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
}

.link-text a,
.link-text span {
    font-size: 16px;
    font-weight: 500;
    color: #0069a2;
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

/* ========== Responsive: 小画面（〜390px） ========== */
@media (max-width: 390px) {
    .link-text span {
        white-space: normal;
    }
    .link-text .text-prefix {
        display: none;
    }
}

/* ========== Signup Button ========== */
.btn-signup {
    background-color: #fafafa;
    border: 2px solid #0084c9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
    filter: drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
    text-decoration: none;
}

.btn-signup .icon-wrap {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signup .btn-label {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    color: #0084c9;
    text-align: center;
    line-height: 1.2;
}

.btn-signup .icon-spacer {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ========== Link Text ========== */
.link-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
}

.link-text a,
.link-text span {
    font-size: 16px;
    font-weight: 500;
    color: #0069a2;
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

/* ========== Responsive: 小画面（〜390px） ========== */
@media (max-width: 390px) {
    .link-text span {
        white-space: normal;
    }
}

/* ========== Border Divider ========== */
.border-divider {
    width: 100%;
    height: 2px;
    background-color: #cad5e2;
    flex-shrink: 0;
}

.border-divider-thin {
    width: 100%;
    height: 1px;
    background-color: #cad5e2;
    flex-shrink: 0;
}

/* ========== Error Message ========== */
.error-message {
    font-size: 14px;
    font-weight: 500;
    color: #a30037;
    text-align: center;
    width: 100%;
    line-height: 1.2;
    display: none;
}

.error-message.show {
    display: block;
}

.error-message:empty {
    display: none;
}

/* ========== Input Group ========== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.input-label {
    font-size: 14px;
    font-weight: 500;
    color: #292524;
    white-space: nowrap;
}

.input-wrapper {
    background-color: #fafafa;
    border: 1px solid #90a1b9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
    transition: border-color 0.15s;
}

.input-wrapper:focus-within {
    border-color: #0084c9;
}

.input-wrapper input {
    flex: 1;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #292524;
    border: none;
    background: transparent;
    outline: none;
    min-width: 0;
    line-height: 1.5;
}

.input-wrapper input::placeholder {
    color: #a6a09b;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.7;
}

.toggle-password:hover {
    opacity: 1;
}

/* ========== Login Button ========== */
.btn-login-wrap {
    width: 100%;
}

.btn-login {
    background-color: #0084c9;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 8px;
    width: 100%;
    filter: drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
    cursor: pointer;
    transition: filter 0.15s;
}

.btn-login:active {
    filter: brightness(0.92) drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
}

.btn-login span {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    color: #fafaf9;
    text-align: center;
    line-height: 1.2;
}

/* ========== Social Login Section ========== */
.social-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.social-or {
    font-size: 14px;
    font-weight: 500;
    color: #a6a09b;
    text-align: center;
    width: 100%;
    line-height: 1.2;
}

/* Apple button */
.btn-apple {
    background-color: #262626;
    border: 2px solid #262626;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px 16px 16px;
    width: 100%;
    filter: drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s;
}

.btn-apple:active {
    filter: brightness(0.9) drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
}

.btn-apple .social-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #fafaf9;
    text-align: center;
    line-height: 1.2;
    min-width: 0;
}

/* Google button */
.btn-google {
    background-color: #ffffff;
    border: 2px solid #0c0a09;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px 16px 16px;
    width: 100%;
    filter: drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s;
}

.btn-google:active {
    filter: brightness(0.96) drop-shadow(0px 1px 0px rgba(64, 64, 64, 0.4));
}

.btn-google .social-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #0c0a09;
    text-align: center;
    line-height: 1.2;
    min-width: 0;
}

/* 共通: アイコン・補足テキスト */
.social-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-label .or-text {
    font-size: 12px;
}

/* ========== Footer ========== */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 73px;
    padding: 10px;
    width: 100%;
    flex-shrink: 0;
}

.footer p {
    font-size: 12px;
    font-weight: 500;
    color: #a6a09b;
    text-align: center;
    line-height: 1.2;
}
