@charset "UTF-8";
@import url("../../init.css");

:root {
    --general-border-color: #888;

    --primary-linkcolor: #4a90d9;
    --title-point-color: #30a9d7;

    --default-fontsize: 16px;
    --default-lineheight: 160%;
    --footer-fontsize: 12px;
    --footer-lineheight: 150%;
    
    --card-std-maxwidth: 400px;
    --card-wide-maxwidth: 440px;

    --oauthbtn-height: 44px;
    --oauthbtn-fontsize: 16px;
}

/* ── リセット・ベース ───────────────────────── */

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

/*
 * HTML5 の hidden 属性は本来 user-agent stylesheet で display: none を効かせるが、
 * 個別クラスで display を指定した要素（例：.actions { display: flex; }）に
 * specificity で負けて効かなくなることがある。常に効くようグローバルで !important 指定する。
 */
[hidden] {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.inline-list {
    list-style: none;   
}

.inline-list li {
    display: inline-block;
    margin: 0px 0.25em;
}

/* ── カード ──────────────────────────────────── */

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: var(--card-std-maxwidth);
}

.card-wide {
    max-width: var(--card-wide-maxwidth);
}

.card-footer {
    max-width: var(--card-std-maxwidth);
    margin-top: 1em;
    font-size: var(--footer-fontsize);
    line-height: var(--footer-lineheight);
}

.section {
    margin-bottom: 1.5rem;
    border-bottom: var(--general-border-color) 1px solid;
    padding-bottom: 1.5rem;
}

.normal-par {
    margin: 1rem 0px;
}

/* ── 見出し ──────────────────────────────────── */

h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

#global-serviceid {
    width: 60%;
    margin: 0px auto;
}

h2 {
    font-size: 1.125rem;
    line-height: 150%;
    margin-bottom: 0.5rem;
    border-left: var(--title-point-color) 0.75rem solid;
    padding-left: 0.5rem;
}

/* ── フォーム ────────────────────────────────── */

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 4px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-linkcolor);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.password-input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    line-height: 20px;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.password-input-wrap input:focus {
    box-shadow: none;
}

.password-input-wrap:focus-within input {
    border-color: var(--primary-linkcolor);
}

.password-input-wrap:focus-within .password-visibility-toggle {
    border-color: var(--primary-linkcolor);
}

.password-visibility-toggle {
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 42px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background: #fff;
    color: #666;
    cursor: pointer;
}

.password-visibility-toggle:hover {
    background: #f5f5f5;
}

.password-visibility-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.password-visibility-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.password-visibility-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ── ボタン ──────────────────────────────────── */

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-linkcolor);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.submit-btn:hover {
    background: #3a7bc8;
}

.danger-btn {
    width: 100%;
    padding: 12px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.danger-btn:hover {
    background: #b91c1c;
}

.iconbtn {
    border: none;
    cursor: pointer;
}

.linkbtn {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--primary-linkcolor);
    text-align: left;
    font: inherit;
    line-height: inherit;
    padding: 0;
}

.linkbtn:hover {
    text-decoration: underline;
}

.card-footer .linkbtn {
    display: inline;
    vertical-align: baseline;
}

.consent-doc-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    flex: 0 0 auto;
}

.consent-checkbox {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #555;
}

.icon-in-btn {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25em;
}

.inline-icon {
    display: inline-block;
    vertical-align: middle;
}

/* ── メッセージ ──────────────────────────────── */

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.info-message {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── フッター文書オーバーレイ ───────────────── */

body.footer-docs-open {
    overflow: hidden;
}

#footer-docs-container {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
}

.footer-docs-card.card {
    width: 100%;
    max-width: min(720px, calc(100vw - 32px));
    max-height: min(82vh, 720px);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

#footer-docs-content {
    overflow: auto;
    padding: 0.5rem 2rem;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: 1rem;
}

.terms-section {
    border: none;
    padding-bottom: 0px;
    margin-bottom: 1em;
}

.terms-section h3 {
    font-weight: bold;
}

.terms-section ul, .terms-section ol {
    padding-left: 2rem;
}

.warning {
    background: #fffbeb;
    color: #b45309;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ── リンク群 ────────────────────────────────── */

.links {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

.links a {
    color: var(--primary-linkcolor);
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.links span {
    color: #999;
    margin: 0 8px;
}

/* ── 外部認証ボタン ──────────────────────────── */

.oauth-separator {
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    margin: 16px 0;
    position: relative;
}

.oauth-separator::before,
.oauth-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #e5e5e5;
}

.oauth-separator::before {
    left: 0;
}

.oauth-separator::after {
    right: 0;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Steamはテキストボタンとし、既存の外部認証ボタンとサイズを揃える。 */
.steam-btn {
    background: #171d25;
    color: #fff;
    border: 1px solid #171d25;
    text-decoration: none;
    justify-content: center;
}

.steam-btn:hover {
    background: #25354b;
}

.oauth-btn {
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}

.oauth-btn:hover {
    background: #f5f5f5;
}

.oauth-btn-google {
    border-color: #dadce0;
    color: #3c4043;
}

.oauth-btn-microsoft {
    border-color: #8c8c8c;
    color: #2f2f2f;
}

.oauth-btn-apple {
    background: #000;
    border-color: #000;
    color: #fff;
}

.oauth-btn-apple:hover {
    background: #1a1a1a;
}

.oauth-button {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: calc(var(--oauthbtn-fontsize) / 2);

    height: var(--oauthbtn-height);
    padding: 0 var(--oauthbtn-fontsize);

    border: none;
    border-radius: calc(var(--oauthbtn-fontsize) / 4);

    font-size: var(--oauthbtn-fontsize);
    
    cursor: pointer;
    transition: background-color 0.15s ease;

    max-width: 400px;
}

/* ── 補足テキスト ────────────────────────────── */

.note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #888;
    display: table;
    margin-left: auto;
    margin-right: auto;
}

.info {
    font-size: 0.875rem;
    color: #555;
    display: table;
    margin: 0px auto;
    margin-bottom: 1rem;
}

.action-help {
    font-size: 0.875rem;
    line-height: 150%;
    color: #555;
    margin: 0.75rem 0.5rem;
}

.action-help p {
    margin-bottom: 1em;
}

.action-help ul {
    margin-bottom: 1em;
}

/* ── フッター ──────────────────────────────── */

#copyright {
    display: table;
    margin: 0.5em auto;
}


/* ── モーダル ──────────────────────────────── */

.modal {
    box-sizing: border-box;
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content p {
    margin-bottom: 1rem;
}
