/* ============================================================
   GEAL ログイン・登録の画面（2026-11-11 作り直し）
   白地・黒いヘッダー（お店の画面と同じ）。色と角丸は variables.css の値だけを使う。
   ============================================================ */

.au-body {
    margin: 0;
    background: #ffffff;
    color: #0A0A0A;
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ヘッダー: お店の画面と同じ黒。ログインまわりではロゴだけを出す */
.au-header {
    background: #0A0A0A;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.au-header img { height: 30px; width: auto; display: block; }

.au-main {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.au-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: 0.01em;
}
.au-lead {
    font-size: 0.92rem;
    color: #4b5563;
    margin: 0 0 24px;
}

/* Google で続ける */
.au-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #0A0A0A;
    font: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.au-google:hover { background: #f9fafb; }
.au-google img { width: 20px; height: 20px; }

.au-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6b7280;
    font-size: 0.85rem;
    margin: 20px 0;
}
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }

/* 入力欄 */
.au-field { margin-bottom: 16px; }
.au-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.au-label a { font-weight: 400; font-size: 0.85rem; }
.au-input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #9ca3af;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #0A0A0A;
    font: inherit;
    font-size: 1rem; /* 16px 未満だと iPhone が拡大する */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.au-input:focus {
    outline: none;
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.18);
}
.au-hint { font-size: 0.8rem; color: #6b7280; margin-top: 6px; }
.au-error {
    font-size: 0.85rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 16px;
}

/* パスワード: 右端に「表示」 */
.au-pass { position: relative; }
.au-pass .au-input { padding-right: 52px; }
.au-pass-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #4b5563;
    cursor: pointer;
    border-radius: var(--radius-md);
}
.au-pass-toggle svg { width: 20px; height: 20px; }

/* ボタン */
.au-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--brand-purple);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}
.au-btn:hover { background: var(--geal-accent-hover, #581C87); }
.au-btn-outline {
    background: #ffffff;
    color: #0A0A0A;
    border: 1px solid #d1d5db;
}
.au-btn-outline:hover { background: #f9fafb; }
/* 2 つ目の大事な操作（ログイン画面の「アカウントを作る」）: 黒の塗り */
.au-btn-dark { background: #0A0A0A; color: #ffffff; }
.au-btn-dark:hover { background: #262626; }

/* 区切りの下の「はじめての方」 */
.au-sep { height: 1px; background: #e5e7eb; margin: 32px 0 24px; }
.au-sub { font-size: 0.92rem; font-weight: 700; margin: 0 0 12px; text-align: center; }
.au-note { font-size: 0.85rem; color: #4b5563; text-align: center; margin: 16px 0 0; }
.au-note a, .au-label a, .au-check a, .au-link { color: var(--brand-purple); text-decoration: underline; text-underline-offset: 2px; }

/* 何のために作るか（お買い物 / お店を開く） */
.au-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.au-role {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.au-role input { position: absolute; opacity: 0; pointer-events: none; }
.au-role svg { width: 22px; height: 22px; color: #4b5563; }
.au-role b { font-size: 0.95rem; }
.au-role span { font-size: 0.78rem; color: #6b7280; line-height: 1.5; }
.au-role:has(input:checked) { border: 2px solid var(--brand-purple); padding: 13px; background: #faf5ff; }
.au-role:has(input:checked) svg { color: var(--brand-purple); }

/* 同意（チェックボックスのままでよいもの: ADR 0032） */
.au-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; margin: 4px 0 20px; }
.au-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand-purple); flex: none; }

/* 選ぶ（性別・事業区分） */
.au-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.au-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    cursor: pointer;
}
.au-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-purple); }
.au-choice:has(input:checked) { border-color: var(--brand-purple); background: #faf5ff; }

.au-dob { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.au-dob select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 30px; }

/* 段の表示（登録 → 確認 → 仕上げ） */
.au-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.au-steps i { flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb; }
.au-steps i.on { background: var(--brand-purple); }
.au-step-label { font-size: 0.8rem; color: #6b7280; margin: -12px 0 16px; }

/* メールを送りました */
.au-icon-big {
    width: 56px; height: 56px; border-radius: 50%;
    background: #f3e8ff; color: var(--brand-purple);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.au-icon-big svg { width: 28px; height: 28px; }
.au-mail { font-weight: 700; word-break: break-all; }
.au-box {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 20px 0;
    font-size: 0.9rem;
}
.au-box ol { margin: 0; padding-left: 1.2em; }
.au-box li + li { margin-top: 6px; }
.au-details { font-size: 0.88rem; margin-top: 20px; }
.au-details summary { cursor: pointer; color: #374151; font-weight: 700; }
.au-details ul { color: #4b5563; padding-left: 1.2em; }

/* 下のリンク */
.au-foot {
    border-top: 1px solid #e5e7eb;
    padding: 20px 16px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 0.8rem;
}
.au-foot a { color: #4b5563; text-decoration: none; }
.au-foot small { width: 100%; text-align: center; color: #9ca3af; margin-top: 6px; }

@media (min-width: 768px) {
    .au-main { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    .au-input, .au-btn, .au-google, .au-role { transition: none; }
}

/* 押せないボタン（同意のチェックまで） */
.au-btn:disabled, .au-google:disabled { background: #e5e7eb; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; }
.au-google:disabled img { opacity: .4; }

/* 同意の箱（ボタンより上に置く） */
.au-agree { border: 1px solid #d1d5db; border-radius: var(--radius-lg); padding: 14px; margin-bottom: 20px; }
.au-agree .au-check { margin: 0; }

/* 規約をその場で読む（画面の上に重ねる） */
.au-sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: none; align-items: flex-end; justify-content: center; z-index: 10000; } /* クッキーの案内（9999）より上 */
.au-sheet.on { display: flex; }
.au-sheet-box { background: #fff; width: 100%; max-width: 640px; height: 88vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; display: flex; flex-direction: column; }
.au-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-weight: 700; }
.au-sheet-head button { background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
/* 本文は規約のページ（目印の間）を読み込んで入れる。iframe は使わない（配信の設定で frame-ancestors 'none'） */
.au-sheet-body { flex: 1; overflow-y: auto; padding: 16px 20px; font-size: 0.9rem; line-height: 1.8; color: #1f2937; -webkit-overflow-scrolling: touch; }
.au-sheet-body p { margin: 0 0 12px; }
.au-sheet-body ol, .au-sheet-body ul { margin: 0 0 12px; }
.au-sheet-body h1, .au-sheet-body h2, .au-sheet-body h3 { font-size: 1rem; margin: 16px 0 8px; }
.au-sheet-body table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-bottom: 12px; }
/* 規約を読むだけのページ（legal-doc.html）: 下から出る白い画面と同じ文の見た目で、ページとして読む */
.au-main-doc { max-width: 720px; }
.au-doc-body { overflow: visible; padding: 0; flex: none; }
.au-back { text-align: left; margin: 0 0 8px; }
.au-sheet-body th, .au-sheet-body td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; vertical-align: top; }
.au-sheet-foot { padding: 12px 16px; border-top: 1px solid #e5e7eb; }
@media (min-width: 768px) { .au-sheet { align-items: center; } .au-sheet-box { border-radius: var(--radius-xl); height: 80vh; } }

.au-check input:disabled + span { color: #6b7280; }

/* 文書ごとの同意（1 行に「同意します」と「読む」） */
.au-doc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #f3f4f6; }
.au-doc:first-of-type { border-top: 0; }
.au-doc .au-check { margin: 0; flex: 1; }
.au-doc-open, .doc-open { flex: none; font: inherit; font-size: 0.85rem; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: var(--radius-md); background: #fff; color: #0A0A0A; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.doc-open svg { width: 14px; height: 14px; }
.doc-open.done { color: #374151; background: #f3f4f6; }

/* ---------- 本番の画面で使う出し分け（2026-11-11） ---------- */
/* hidden を付けた物は必ず隠す（.au-btn の display より強く） */
.au-body [hidden] { display: none !important; }
/* お買い物 / お店を開く で出す物を変える（登録の画面） */
.au-body[data-role="buyer"] .only-seller, .au-body[data-role="seller"] .only-buyer { display: none; }
/* すでにログインしている人がお店を開く: メールと Google の欄はいらない */
.au-body:not(.signed-in) .only-signed-in { display: none; }
.au-body.signed-in .only-signed-out, .au-body.signed-in .au-roles { display: none; }
/* 確かめて OK だったときの一言 */
.au-ok { font-size: 0.85rem; color: #15803D; margin: 0 0 12px; }
#sendStatus.au-hint { margin: 0 0 12px; }
