/* ============================================================
   SMART GOLF 会員サイト — メインスタイルシート
   Design reference: https://sma-gol.com/
   ============================================================ */

/* ★hidden 属性を必ず効かせる（2026-08-31 追加）
 *
 * === なぜ要るか ===
 * hidden は「ブラウザ標準の display:none」で消えている。
 * そのため **クラス側で display を指定すると打ち消される**（作者スタイルが優先）。
 *
 * 実例: .sg-field { display: block } のせいで
 *   <div class="sg-field" id="ur-relation-corp" hidden>（法人の「部署名」欄）
 * が、ファミリーの方の登録画面にも出続けていた（2026-08-31 発覚）。
 * JSは正しく hidden を付けていたのに、CSSが勝っていた。
 *
 * このファイルには .sg-bay-picker[hidden] など**個別の打ち消し**が3つある。
 * 同じ罠をその都度パッチしていた形跡なので、ここで一度に解決する。
 *
 * ★display を持つクラスに hidden を付ける箇所は今後も増える。
 *   個別対応をやめて、この1行で全部を守る。 */
[hidden] { display: none !important; }

/* ---- CSS Variables ---- */
:root {
    --color-primary:    #0B2D6F;   /* SMART GOLF ネイビー */
    --color-gold:       #C4A44A;   /* ゴールドアクセント */
    --color-line:       #06C755;   /* LINE グリーン */
    --color-bg:         #F2F5FA;
    --color-white:      #FFFFFF;
    --color-text:       #1A1A2E;
    --color-text-muted: #64748B;
    --color-border:     #DDE2EC;
    --radius-sm:        6px;
    --radius-md:        12px;
    --shadow-sm:        0 2px 8px rgba(11,45,111,0.08);
    --shadow-md:        0 6px 24px rgba(11,45,111,0.14);
    --font-base:        'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --container-max:    960px;
}

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

body {
    font-family: var(--font-base);
    background:  var(--color-bg);
    color:       var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-primary); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ---- Typography ---- */
h1 { font-size: 1.625rem; font-weight: 800; }
h2 { font-size: 1.25rem;  font-weight: 700; }
h3 { font-size: 1.05rem;  font-weight: 700; }

/* ---- Container ---- */
.sg-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}


/* ==============================================
   MAIN
   ============================================== */
.sg-main {
    min-height: calc(100vh - 64px);
    padding: 24px 0 56px;
}

/* ==============================================
   CURRENT STORE BANNER
   店舗を選んだあと、どの店舗を見ているかを示す帯。

   ★以前は紺色の細い帯に「📍 店舗名」と小さな文字リンクを詰めていたが、
     店舗名が読みにくく「店舗を変更」も文字が小さすぎて押しづらかった。
     絵文字をやめ、白いカードに **店舗名を大きく・ボタンを大きく** 置く形に変更（2026-08-27）。
   ============================================== */
.sg-store-banner {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* 「ご予約の店舗」など、何の店舗なのかの見出し */
.sg-store-banner__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}
.sg-store-banner__name {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--color-primary);
    word-break: break-word;
}
/* 所属店舗以外を見ているときの但し書き（打席予約の相互利用） */
.sg-store-banner__note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: -4px;
}
/* 文字リンクではなく、指で押せる大きさのボタンにする */
.sg-store-banner__change {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-primary);
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.18s, transform 0.1s;
}
.sg-store-banner__change:hover  { opacity: 0.85; color: var(--color-primary); }
.sg-store-banner__change:active { transform: scale(0.98); }
/* 「所属店舗に戻す」などの副ボタン。主ボタンと並べても迷わないよう枠線を弱くする */
.sg-store-banner__home {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text-muted);
    font-family: var(--font-base);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}
.sg-store-banner__home:hover { opacity: 0.85; }

/* 打席予約の相互利用：店舗を選び直すパネル（既定は閉じている） */
.sg-bay-picker {
    border-top: 1px solid var(--color-border);
    padding-top: 14px;
}
.sg-bay-picker[hidden] { display: none; }

/* .sg-booking-wrap は align-items:center なので、幅を明示しないと
   バナーが中身の幅まで縮んでしまう */
.sg-booking-wrap .sg-store-banner {
    width: 100%;
    max-width: 420px;
    margin-bottom: 0;
}

/* ==============================================
   STORE SELECT PAGE
   ============================================== */

/* ---- Brand selection buttons (Step ①) ---- */
.sg-store-select__brand-btns {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}
.sg-brand-btn {
    flex: 1;
    padding: 18px 10px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    cursor: pointer;
    font-family: var(--font-base);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}
.sg-brand-btn:hover {
    border-color: var(--color-primary);
}
.sg-brand-btn__badge {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-white);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 7px;
}
.sg-brand-btn__name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
}
/* active 状態（選択済み） */
.sg-brand-btn--active {
    border-color: var(--color-primary);
    background: var(--color-primary);
}
.sg-brand-btn--active .sg-brand-btn__name {
    color: var(--color-white);
}
.sg-brand-btn--active .sg-brand-btn__badge {
    background: var(--color-gold);   /* ゴールドはそのまま維持 */
}
.sg-page-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px 16px 0;
}
.sg-page-header h1 { color: var(--color-primary); margin-bottom: 8px; }
.sg-page-header p  { color: var(--color-text-muted); font-size: 0.875rem; }

/* レッスン訴求 PR ブロック（①コーチ連絡導線の店舗選択ページのみ） */
.sg-lesson-pr {
    max-width: 480px;
    margin: 0 auto 24px;
    padding: 20px 20px 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.sg-lesson-pr__lead {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.sg-lesson-pr__text {
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 14px;
}
.sg-lesson-pr__points {
    list-style: none;
    display: grid;
    gap: 8px;
}
.sg-lesson-pr__points li {
    position: relative;
    padding-left: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}
.sg-lesson-pr__points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-gold);
    font-weight: 800;
}

/* ステップラベル（① 都道府県 / ② エリア） */
.sg-store-select__step-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 20px 0 8px;
}
.sg-store-select__step-label:first-child { margin-top: 0; }

/* エリア選択行（JS で表示切り替え） */
.sg-store-select__area-row { margin-top: 4px; }

.sg-store-select__btn:disabled {
    background: #b0b8cc;
    cursor: not-allowed;
    transform: none;
}

.sg-store-select {
    max-width: 480px;
    margin: 0 auto;
}
.sg-store-select__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    text-align: center;
}
.sg-store-select__wrapper { position: relative; }
.sg-store-select__wrapper::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    pointer-events: none;
    font-size: 0.7rem;
}
.sg-store-select__select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-white);
    color: var(--color-text);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: var(--font-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sg-store-select__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11,45,111,0.1);
}
.sg-store-select__btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 16px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-base);
    transition: background 0.2s, transform 0.1s;
}
.sg-store-select__btn:hover  { background: #0d3a8f; }
.sg-store-select__btn:active { transform: scale(0.98); }

/* ==============================================
   HOME MENU
   ============================================== */
.sg-main--home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: calc(100vh - 64px);
}

.sg-home {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* トップの待機画面。
   トップは「LIFFの折り返し地点」なので、通過中に別の画面が見えないよう
   最初からこれを出しておく。通過しなかったときだけ、予備のメニューに切り替わる。 */
.sg-liff-veil {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sg-liff-veil[hidden] { display: none; }
.sg-liff-veil__inner { text-align: center; }
.sg-liff-veil__text {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}
.sg-liff-veil__spinner {
    display: inline-block;
    width: 34px;
    height: 34px;
    border: 3px solid #e3e7ec;
    border-top-color: #0B2D6F;
    border-radius: 50%;
    animation: sg-liff-spin 0.9s linear infinite;
}
@keyframes sg-liff-spin { to { transform: rotate(360deg); } }

/* 目が回るのが苦手な人には回転を見せない */
@media (prefers-reduced-motion: reduce) {
    .sg-liff-veil__spinner { animation: none; }
}

.sg-home__header {
    text-align: center;
}
.sg-home__logo {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--color-gold);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.sg-home__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 0.04em;
}

.sg-home__menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-home-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1rem;
    transition: box-shadow 0.2s, transform 0.15s;
    border: 1.5px solid transparent;
    cursor: pointer;
}
a.sg-home-btn:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
a.sg-home-btn:active {
    transform: scale(0.98);
}

.sg-home-btn--disabled {
    background: var(--color-white);
    color: var(--color-text-muted);
    cursor: default;
    opacity: 0.6;
}

.sg-home-btn__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}
.sg-home-btn--disabled .sg-home-btn__icon {
    color: var(--color-text-muted);
}

.sg-home-btn__label {
    flex: 1;
}

.sg-home-btn__arrow {
    font-size: 1.4rem;
    color: var(--color-gold);
    line-height: 1;
}

.sg-home-btn__badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--color-border);
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==============================================
   BUTTONS (汎用)
   ============================================== */
.sg-btn {
    display: block;
    text-align: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-base);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.18s, transform 0.1s;
    text-decoration: none;
}
.sg-btn:hover  { opacity: 0.85; }
.sg-btn:active { transform: scale(0.97); }

.sg-btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}
.sg-btn--outline {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.sg-btn--line {
    background: var(--color-line);
    color: var(--color-white);
}
.sg-btn--booking {
    background: var(--color-primary, #1a4f9c);
    color: var(--color-white);
}
.sg-btn--instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: var(--color-white);
}

/* レッスン予約ページ */
.sg-booking-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px;
    gap: 16px;
}
.sg-booking-lead {
    font-size: 1rem;
    text-align: center;
    color: var(--color-text);
    margin: 0;
}
/* 口コミボタン（--outline）も同じ幅で並べる。アンケート完了画面で
   「打席を予約する」の下に置くため、幅が違うと不揃いに見える */
.sg-booking-wrap .sg-btn--booking,
.sg-booking-wrap .sg-btn--outline {
    width: 100%;
    max-width: 360px;
    font-size: 1.05rem;
    padding: 16px;
}

/* ==============================================
   COACH CARDS
   ============================================== */
.sg-coach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sg-coach-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.sg-coach-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* 横1024:縦678 = 約1.51:1 → padding-top で比率確保 */
.sg-coach-card__image-wrap {
    position: relative;
    padding-top: 66.2%;
    overflow: hidden;
    background: var(--color-primary);
}
.sg-coach-card__image-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
}
.sg-coach-card__image-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
    font-size: 3.5rem;
}

.sg-coach-card__body { padding: 16px; }

.sg-coach-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.sg-coach-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.sg-coach-card__best {
    background: var(--color-gold);
    color: var(--color-white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.sg-coach-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: right;
    margin-left: auto;
}
/* コーチ本人のSGPTタイプ（診断を受けたコーチにだけ出る） */
.sg-coach-card__sgpt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: #F5F7FC;
    border: 1px solid #DDE3F0;
    color: #0C3280;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}
.sg-coach-card__sgpt-code {
    background: #0C3280;
    color: #fff;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}
.sg-coach-card__intro {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 12px;
    white-space: pre-line;
}

/* 対応可能時間 アコーディオン */
.sg-avail {
    margin-bottom: 12px;
    border: 1px solid #e0e4ea;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.sg-avail__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: #f4f6f9;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    gap: 8px;
}
.sg-avail__icon {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}
.sg-avail__toggle[aria-expanded="true"] .sg-avail__icon {
    transform: rotate(180deg);
}
.sg-avail__body {
    padding: 12px 14px;
    background: var(--color-white);
}
.sg-avail__body[hidden] { display: none; }
.sg-avail__text {
    font-size: 0.83rem;
    line-height: 1.75;
    color: var(--color-text);
    margin: 0;
}
/* アコーディオン内 仕切り・ラベル */
.sg-avail__divider {
    border: none;
    border-top: 1px solid #e0e4ea;
    margin: 10px 0;
}
.sg-avail__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 4px;
}
/* 準備中（アコーディオン内） */
.sg-avail__pending {
    font-size: 0.83rem;
    color: var(--color-text-muted, #aaa);
    margin: 0;
    text-align: center;
    padding: 4px 0;
}
.sg-coach-card__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==============================================
   PLAN CARDS
   ============================================== */
.sg-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.sg-plan-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--color-gold);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.sg-plan-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.sg-plan-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}
.sg-plan-card__price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}
.sg-plan-card__price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-muted);
}
.sg-plan-card__meta {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}
.sg-plan-card__desc {
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.65;
    margin-bottom: 20px;
    flex: 1;
    /* 入力欄の改行をそのまま表示する（◆見出し・・箇条書きを使うため） */
    white-space: pre-line;
}
.sg-plan-card__btn {
    display: block;
    text-align: center;
    padding: 14px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 0.18s;
    margin-top: auto;
}
.sg-plan-card__btn:hover { opacity: 0.85; color: var(--color-white); }

/* ==============================================
   EMPTY STATE
   ============================================== */
.sg-empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--color-text-muted);
}
.sg-empty__icon { font-size: 3.5rem; margin-bottom: 16px; }
.sg-empty p     { font-size: 0.95rem; }
.sg-empty a     { color: var(--color-primary); font-weight: 600; }

/* 空状態の中に置くボタン（例: プラン準備中の「他の店舗を見る」）
   ★上の .sg-empty a のほうが指定が強く、ボタンの文字色が青に戻されてしまう。
     青背景に青文字で読めなくなるため、ここで白に戻す。 */
.sg-empty .sg-btn,
.sg-empty .sg-btn-sub {
    display: block;
    max-width: 320px;
    margin: 20px auto 0;
}
.sg-empty .sg-btn--booking,
.sg-empty .sg-btn--primary,
.sg-empty .sg-btn--line,
.sg-empty .sg-btn-sub { color: var(--color-white); }

/* ==============================================
   FOOTER
   ============================================== */
.sg-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 24px 16px;
    font-size: 0.78rem;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 640px) {
    h1 { font-size: 1.3rem; }

    .sg-coach-grid,
    .sg-plan-grid {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .sg-coach-card,
    .sg-plan-card { transition: none; }
}

/* ================================================================
   入会フロー・フォーム共通（旧 join.css を統合）
   ================================================================ */

#sg-tos-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 15px 40px;
  /* スマホで見やすい余白 */
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  /* 明朝体指定 */
  color: #1a1a1a;
  background-color: #fff;
  line-height: 1.8;
  font-size: 14px;
  /* スマホ基準 */
  box-sizing: border-box;
}

/* --- 見出しデザイン --- */
#sg-tos-wrapper .sg-main-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 5px;
  letter-spacing: 2px;
  border: none;
  margin-top: 0;
}

#sg-tos-wrapper .sg-subtitle {
  text-align: center;
  font-size: 14px;
  margin-bottom: 40px;
  font-weight: bold;
}

#sg-tos-wrapper .sg-article-title {
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
  margin-top: 35px;
  margin-bottom: 15px;
}

/* --- 本文・リストスタイル --- */
#sg-tos-wrapper p {
  margin-bottom: 1em;
  text-align: justify;
}

/* 数字リスト (1. 2. ...) */
#sg-tos-wrapper ol.sg-list-num {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

#sg-tos-wrapper ol.sg-list-num>li {
  margin-bottom: 0.8em;
  padding-left: 0.5em;
}

/* 括弧リスト ((1) (2) ...) */
#sg-tos-wrapper ol.sg-list-kako {
  counter-reset: list-kako;
  list-style: none;
  padding-left: 1em;
  margin-top: 0.5em;
}

#sg-tos-wrapper ol.sg-list-kako>li {
  position: relative;
  padding-left: 2em;
  margin-bottom: 0.5em;
}

#sg-tos-wrapper ol.sg-list-kako>li::before {
  counter-increment: list-kako;
  content: "(" counter(list-kako) ") ";
  position: absolute;
  left: 0;
  top: 0;
}

/* --- 日付エリア --- */
#sg-tos-wrapper .sg-dates {
  margin-top: 50px;
  text-align: right;
  font-size: 13px;
}

#sg-tos-wrapper .sg-dates p {
  margin-bottom: 5px;
  margin-top: 0;
}

/* --- シックなアクションエリア --- */
#sg-tos-wrapper .sg-action-area {
  margin-top: 60px;
  padding: 40px 20px;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  text-align: center;
  border-radius: 4px;
}

/* チェックボックス */
#sg-tos-wrapper .sg-checkbox-wrapper {
  margin-bottom: 25px;
}

#sg-tos-wrapper .sg-checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  font-weight: bold;
}

#sg-tos-wrapper .sg-checkbox-label input {
  transform: scale(1.3);
  margin-right: 10px;
  cursor: pointer;
}

/* 送信ボタン（全フォーム統一・大きめ） */
.sg-submit-button {
  background-color: #0B6E4F;
  color: #fff;
  border: none;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  border-radius: 8px;
  width: 100%;
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
.sg-submit-button:hover { opacity: 0.9; }
.sg-submit-button:disabled { background-color: #ccc; color: #888; cursor: not-allowed; opacity: 0.7; }

/* --- モーダル全体 --- */
.sg-modal {
  display: none;
  /* 初期状態は非表示 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  /* 黒背景（透過） */
}

/* モーダルコンテンツ */
.sg-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  /* 上下5%、左右中央 */
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 650px;
  /* PC用幅制限 */
  border-radius: 8px;
  box-sizing: border-box;
}

.sg-section-header {
  font-size: 20px;
  font-weight: bold;
  border-bottom: 2px solid #333;
  padding-bottom: 15px;
  margin-bottom: 20px;
  text-align: center;
  margin-top: 0;
}

.sg-description {
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}

/* 署名キャンバスラッパー */
.sg-signature-wrapper {
  border: 2px dashed #bbb;
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  cursor: crosshair;
  /* スマホでのスクロール防止などに配慮が必要だが、基本は枠内に描画 */
}

/* Canvas自体はJSで制御するが、念のためレスポンシブ用に */
#sg-signature-pad {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  /* スマホでのスクロール無効化（描画優先） */
}

.sg-clear-btn-wrapper {
  text-align: right;
  margin-top: 10px;
  margin-bottom: 20px;
}

#sg-clear-signature {
  background: #f0f0f0;
  border: 1px solid #ccc;
  color: #555;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}

#sg-clear-signature:hover {
  background-color: #e0e0e0;
}

/* モーダル内フッター（確定ボタン） */
.sg-modal-footer {
  text-align: center;
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

#sg-modal-confirm {
  background-color: #c5a059;
  /* ゴールド系 */
  color: #fff;
  border: none;
  padding: 15px 50px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
}

#sg-modal-confirm:hover {
  background-color: #b08d45;
}
/* ============================================================
   入会フロー 追加スタイル（WP移植で追加）
   ============================================================ */
.sg-join-step { }
.sg-join-inner { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-join-heading { font-size: 18px; margin: 8px 0 12px; }
.sg-join-note { color: #666; font-size: 13px; line-height: 1.7; }

/* ===== 複数選択のチェックボックス群 =====
   購入後アンケートの「入会された理由」と、テスト用リセットの「消す範囲」で使う。

   ★.sg-checkbox-group / __wrapper / __label には**素の指定が無く**、
     #sg-tos-wrapper 配下のときだけ形が付いていた。そのため他の画面では
     label が inline のまま、中の .sg-field-hint（display:block）で行が割れ、
     チェックボックスだけが浮いて見えていた。ここで共通の形を与える（2026-08-27）。

   ※ 個別の上書き（.sg-join-notes__item / .sg-facility__agree / .sg-subreg__terms）は
     **このあとに書くこと**。同じ強さなので、先に書くとこちらに負ける。 */
.sg-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.sg-checkbox-wrapper { margin: 0; }
.sg-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    line-height: 1.6;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
/* 指で押せる大きさにする。チェックは折り返さず先頭行に固定 */
.sg-checkbox-label > input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.sg-checkbox-label > span {
    flex: 1 1 auto;
    min-width: 0;
}
/* 選択肢名の下に付く補足。行を分けて小さく出す */
.sg-checkbox-label .sg-field-hint { margin-top: 5px; }
.sg-checkbox-label:has(> input:checked) {
    border-color: var(--color-primary);
    background: #F4F7FD;
}

/* ご入会時の注意点（直入会のみ）
   契約に関わる説明なので、読み飛ばされないよう1項目ずつ枠で区切る。
   違約金の行だけ色を変えて目を留める（金額の見落としが一番の事故になるため）。 */
.sg-join-notes { margin: 16px 0 24px; }
.sg-join-notes__title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.sg-join-notes__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    font-size: 13.5px;
    line-height: 1.75;
    cursor: pointer;
}
.sg-join-notes__item input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}
.sg-join-notes__item:first-of-type { border-color: #e6b3b8; background: #fdf6f6; }

/* ==============================================
   直入会の入口（/join-start/）
   ============================================== */
.sg-jstart { max-width: 480px; margin: 0 auto; }
.sg-jstart-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* 入会の流れ。いきなり規約から始まる唐突さを減らすための3ステップ */
.sg-jstart-steps { list-style: none; margin: 0 0 28px; }
.sg-jstart-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
}
.sg-jstart-steps__no {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sg-jstart-steps__body strong { display: block; font-size: 15px; margin-bottom: 4px; }
.sg-jstart-steps__body small  { display: block; font-size: 12.5px; color: var(--color-text-muted); line-height: 1.7; }

.sg-jstart-cta { text-align: center; }

.sg-jstart-nostore { text-align: center; margin-top: 18px; }
.sg-linkish {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
}

.sg-jstart-waitlist {
    margin-top: 26px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 18px;
}
.sg-jstart-waitlist h2 { font-size: 16px; margin-bottom: 8px; }
.sg-jstart-waitlist__lead { font-size: 13px; color: var(--color-text-muted); line-height: 1.8; margin-bottom: 16px; }
.sg-jstart-address {
    margin: -6px 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

/* LINE認証が取れなかったときの案内（入力させる前に出す） */
.sg-auth-error {
    text-align: center;
    padding: 60px 20px;
    font-size: 14px;
    line-height: 2;
    color: #444;
}

/* 戻る（ページ単位・手続きのステップ単位で共通） */
.sg-back-bar { padding: 12px 0 0; }
.sg-back-btn {
    display: inline-block;
    background: none;
    border: 0;
    padding: 8px 2px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
}
.sg-back-btn:hover { color: var(--color-primary); }
/* 手続き画面（.sg-join-inner が左右に余白を持つ）では位置をそろえる */
#sg-join .sg-back-bar,
#sg-rejoin .sg-back-bar { padding: 12px 20px 0; }

/* 署名の入力方法の切り替え（手書き / 文字入力） */
.sg-sign-modes { display: flex; gap: 8px; margin-bottom: 14px; }
.sg-sign-mode {
    flex: 1;
    padding: 12px 8px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    cursor: pointer;
}
.sg-sign-mode.is-active {
    border-color: var(--color-primary);
    background: #F0F7F3;
    color: var(--color-primary);
    font-weight: 700;
}
/* 文字署名のプレビュー枠（手書きの枠と同じ見た目。高さだけ低くする）
   ★2つのクラスで書いているのは、後ろにある .sg-sign-canvas-wrap の高さに負けないため */
.sg-sign-canvas-wrap.sg-sign-canvas-wrap--preview { height: 26vh; min-height: 150px; }
.sg-sign-text-canvas { width: 100%; height: 100%; display: block; }
#sg-sign-confirm { margin-top: 16px; }

/* 前回の手続きが残っている人への案内（規約・署名をスキップしたことを伝える） */
.sg-resume-notice {
    background: #F0F7F3;
    border: 1px solid #C7E0D3;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.9;
    color: #33473E;
}
.sg-resume-notice__title { margin: 0 0 4px; font-weight: 700; color: var(--color-primary); }
.sg-resume-notice p { margin: 0; }

/* 入力欄に戻せない項目（氏名）を、保存済みの値のまま確認してもらうための表示 */
.sg-saved-value { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.7; }
.sg-saved-value--sub { font-size: 13px; font-weight: 400; color: #666; }
#sg-name-saved .sg-btn-sub { margin-top: 10px; padding: 8px 16px; font-size: 13px; }

/* ?sgdebug=1 で開いたときだけ出る、LINE認証の状態表示（liff-auth.js が出す） */
.sg-liff-debug,
.sg-join-debug {
    background: #FFF8E1;
    border-bottom: 1px solid #E6D9A8;
    padding: 12px 16px;
    font-size: 11.5px;
    line-height: 1.8;
    color: #4A4030;
    word-break: break-all;
}
.sg-liff-debug strong,
.sg-join-debug strong {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: #0B2D6F;
}

/* 姓と名など、横に2つ並べる入力欄 */
.sg-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 入力フィールド（退会可能月・特別条件） */
.sg-field { display: block; margin: 14px 0; }
.sg-field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.sg-field input,
.sg-field select,
.sg-field textarea { width: 100%; box-sizing: border-box; padding: 14px; border: 1px solid #bbb; border-radius: 8px; font-size: 16px; font-family: inherit; background: #fff; }

/* 署名 */
.sg-sign-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }
.sg-sign-canvas-wrap { position: relative; height: 40vh; min-height: 240px; background: #fff; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
#sg-full-canvas { width: 100%; height: 100%; display: block; touch-action: none; position: relative; z-index: 10; }
.sg-sign-guides { position: absolute; inset: 0; pointer-events: none; z-index: 0; user-select: none; }
.sg-sign-guide { position: absolute; left: 16px; color: #e2e2e2; font-size: 40px; font-weight: bold; }
.sg-sign-guide--sei { top: 8px; }
.sg-sign-guide--mei { top: calc(50% + 8px); }
.sg-sign-guide-line { position: absolute; top: 50%; left: 5%; right: 5%; border-top: 2px dashed #e0e0e0; transform: translateY(-50%); }

/* 汎用サブボタン */
.sg-btn-sub { display: inline-block; text-align: center; background: #999; color: #fff; border: 0; padding: 14px 24px; border-radius: 8px; font-size: 16px; cursor: pointer; text-decoration: none; }

/* 署名ツールバーのボタンは横並び（全幅にしない） */
.sg-sign-toolbar { align-items: center; }
.sg-sign-toolbar .sg-submit-button { width: auto; display: inline-block; }

/* ワンストップ確認 */
.sg-join-confirm { max-width: 640px; }
.sg-confirm-card { background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 10px; padding: 18px; margin: 16px 0; }
.sg-confirm-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #666; margin: 0 0 6px; }
/* 店舗バナー（.sg-store-banner__name）と同じ見え方にそろえる。2026-08-27 */
.sg-confirm-store { font-size: 22px; font-weight: 800; line-height: 1.35; color: var(--color-primary); margin: 0; word-break: break-word; }
.sg-confirm-card .sg-store-banner__change { margin-top: 14px; }
.sg-confirm-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.sg-confirm-actions .sg-submit-button { text-align: center; text-decoration: none; }

/* 退会可能月セレクト・必須バッジ */
.sg-field select { padding: 14px; border-radius: 8px; font-size: 16px; }
.sg-required { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 11px; font-weight: 700; color: #fff; background: #e0556b; border-radius: 10px; vertical-align: middle; }

/* 入口分岐メニュー */
.sg-entry { max-width: 560px; }
.sg-entry-menu { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.sg-entry-btn { display: block; padding: 18px 20px; border: 1px solid #ddd; border-radius: 12px; text-decoration: none; color: #222; background: #fff; transition: box-shadow .15s; }
.sg-entry-btn:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.sg-entry-btn--main { border-color: #0B6E4F; background: #eefaf4; }
.sg-entry-btn__title { display: block; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.sg-entry-btn__desc { display: block; font-size: 13px; color: #666; }
/* レッスンのハブ（page-lesson.php）。前回の店舗で進むボタンと、その下の「別の店舗を選ぶ」 */
.sg-hub-item { display: block; }
.sg-hub-alt  { margin: 6px 2px 0; text-align: right; font-size: 12px; }
.sg-hub-alt a { color: #666; }
/* 「まずコーチから」の注意書き。ボタンは押せるままなので、色で止めず読ませる */
.sg-hub-note { margin: 8px 2px 0; font-size: 12px; line-height: 1.7; color: #666; }
/* STEP 1 / STEP 2。2つの入口ではなく1本の流れであることを、見た目でも示す */
.sg-hub-step { display: inline-block; margin-bottom: 6px; padding: 2px 8px;
    border: 1px solid #cfe9dd; border-radius: 99px; background: #eefaf4;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--color-primary); }
.sg-hub-step--2 { border-color: #ddd; background: #f4f4f4; color: #666; }

/* フィールド補足ヒント */
.sg-field-hint { display: block; margin-top: 4px; font-size: 12px; color: #666; line-height: 1.6; }
.sg-field-hint strong { color: #0B6E4F; }

/* 入力させずに決まった値を見せる欄（直入会の退会可能月など）。
   入力欄と同じ枠にすると押せると思われるので、枠を付けず値だけを強く出す */
.sg-field-static { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: #0B6E4F; }

/* ===== プラン種別セクション・レディースアコーディオン ===== */
.sg-plan-cat { margin-bottom: 28px; }
.sg-plan-cat__title { font-size: 18px; font-weight: 700; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--color-primary); }
.sg-plan-accordion { margin: 8px 0 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.sg-plan-accordion__summary { cursor: pointer; padding: 16px; font-weight: 700; background: #f5f7fb; list-style: none; }
.sg-plan-accordion__summary::-webkit-details-marker { display: none; }
.sg-plan-accordion__summary::after { content: '＋'; float: right; color: var(--color-text-muted); }
.sg-plan-accordion[open] .sg-plan-accordion__summary::after { content: '−'; }
.sg-plan-accordion__group { padding: 12px 16px 16px; }
.sg-plan-accordion__group + .sg-plan-accordion__group { border-top: 1px solid var(--color-border); }
.sg-plan-accordion__group-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; padding-left: 8px; border-left: 3px solid var(--color-primary); }

/* プランを選ばずに抜ける出口（QR購入者用）
   ★プランのボタンとは色をはっきり分ける。同じ見た目だと「プランの一種」に見え、
     対象でない方まで押してしまう（QR購入導線_要件定義書 §4-3）。 */
.sg-plan-exit { margin: 28px 0 8px; padding: 18px 16px; background: #f5f7fb; border: 1px solid var(--color-border); border-radius: var(--radius-md); text-align: center; }
.sg-plan-exit__title { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--color-text); }
.sg-plan-exit__lead { font-size: 13px; line-height: 1.7; margin: 0 0 14px; color: var(--color-text-muted); text-align: left; }
.sg-plan-exit .sg-btn-sub { width: 100%; max-width: 320px; }
.sg-plan-exit__note { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--color-primary); }

/* ============================================================
   施設内の注意点（/facility-rules/）
   対象は直入会と子ユーザーだけ。店舗で口頭の説明を受ける機会が無い方に読んでいただく。
   ★「ご入会時の注意点」（.sg-join-notes）とは別物。あちらは契約の話。
   ============================================================ */
.sg-facility { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-facility__title { font-size: 18px; margin: 8px 0 12px; }
.sg-facility__lead { color: #666; font-size: 13px; line-height: 1.8; margin-bottom: 18px; }

/* 本文。管理画面で入れたHTMLがそのまま入るので、中の要素にも効かせる */
.sg-facility__body {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.85;
}
.sg-facility__body h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 22px 0 8px;
    padding-left: 8px;
    border-left: 3px solid var(--color-primary);
}
.sg-facility__body h3:first-child { margin-top: 0; }
.sg-facility__body p { margin: 0 0 12px; }
.sg-facility__body ul, .sg-facility__body ol { margin: 0 0 14px; padding-left: 1.3em; }
.sg-facility__body li { margin-bottom: 6px; }
.sg-facility__body strong { font-weight: 700; }

/* 末尾の目印。ここが画面に入ると同意チェックが押せるようになる（見えない要素） */
.sg-facility__end { height: 1px; }

.sg-facility__loading { text-align: center; padding: 28px 20px; color: var(--color-text-muted); font-size: 13px; }

.sg-facility__agree { margin-top: 22px; }
.sg-facility__agree .sg-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.75;
    cursor: pointer;
}
.sg-facility__agree input[disabled] + span { color: #9aa3ad; }
.sg-facility__hint { color: var(--color-text-muted); font-size: 12px; margin: 8px 0 0; }

.sg-facility__done { margin-top: 22px; text-align: center; }
.sg-facility__done-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.sg-facility__done-at { color: var(--color-text-muted); font-size: 12px; margin-bottom: 16px; }
/* ご予約はリッチメニューからご利用いただく旨のご案内（2026-08-27 追加） */
.sg-facility__done-lead { font-size: 13px; margin: 0 0 14px; }
/* ボタンの下に置く控えめな戻り導線（主導線は会員ポータル） */
.sg-facility__done-back { margin: 14px 0 0; font-size: 13px; }
.sg-facility__done-back a { color: var(--color-text-muted); text-decoration: underline; }

.sg-facility__error {
    margin-top: 22px;
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.8;
}

/* ============================================================
   子ユーザーの登録（/user-register/）
   ファミリーのご家族・法人の社員が、招待リンクから自分を登録する画面。
   ============================================================ */
.sg-subreg { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-subreg__title { font-size: 18px; margin: 8px 0 12px; }
.sg-subreg__loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 13px; }

/* 進めないとき（招待コードが無効・契約が停止中など）の案内 */
.sg-subreg__stop {
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    border-radius: 8px;
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.9;
}

/* どの契約にぶら下がるのかを最初に見せる（誤登録を防ぐため） */
.sg-subreg__contract {
    background: #fff;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.sg-subreg__contract-label { display: block; font-size: 11px; color: var(--color-text-muted); letter-spacing: .08em; }
.sg-subreg__contract-name { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }

.sg-subreg__lead { color: #666; font-size: 13px; line-height: 1.8; margin-bottom: 18px; }

.sg-subreg__terms { margin: 22px 0 16px; }
.sg-subreg__terms .sg-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.75;
    cursor: pointer;
}

.sg-subreg__msg { margin-top: 12px; font-size: 13px; line-height: 1.8; color: #9E4A32; }

.sg-subreg__done { text-align: center; padding-top: 20px; }
.sg-subreg__done-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.sg-subreg__done-body { font-size: 14px; line-height: 1.9; margin-bottom: 20px; }

/* ============================================================
   法人のお問い合わせ（/corporate/）
   /entry/ の「法人プランを検討する」から来る。
   ============================================================ */
.sg-corp { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-corp__title { font-size: 18px; margin: 8px 0 12px; }
.sg-corp__lead { color: #666; font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
.sg-corp__loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 13px; }
.sg-corp__msg { margin-top: 12px; font-size: 13px; line-height: 1.8; color: #9E4A32; }

.sg-corp__done { text-align: center; padding-top: 24px; }
.sg-corp__done-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.sg-corp__done-body { font-size: 14px; line-height: 1.9; margin-bottom: 14px; }

.sg-corp__error {
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    border-radius: 8px;
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.9;
}

/* ================================================================
   ご家族の登録（契約者ご本人の画面 /user-invite/）
   ★/user-register/（.sg-subreg）と対になる画面。並べて直せるよう書き方を揃えている。
   ================================================================ */
.sg-subinv { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-subinv__title { font-size: 18px; margin: 8px 0 16px; }
.sg-subinv__loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 13px; }

/* 進めないとき（契約者でない・会員が見つからない）の案内 */
.sg-subinv__stop {
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    border-radius: 8px;
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.9;
}

.sg-subinv__card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 16px;
}
.sg-subinv__card-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--color-primary); }
.sg-subinv__card--regen .sg-subinv__card-title { border-left-color: var(--color-text-muted); }

/* そのまま送る文面。書き換えさせないので readonly（page-user-invite.php） */
.sg-subinv__msg {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.9;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f7f9fc;
    resize: vertical;
}

/* URLは畳んでおく。開いた方が「こちらだけ送ればいい」と受け取らないように */
.sg-subinv__url-box { margin-top: 14px; font-size: 12px; color: var(--color-text-muted); }
.sg-subinv__url-box > summary { cursor: pointer; }
.sg-subinv__url-box .sg-subinv__url { margin-top: 8px; }
.sg-subinv__url-box .sg-btn-sub { margin-top: 8px; padding: 8px 16px; font-size: 13px; }

/* リンクは折り返さず1行で見せる。途中で切れていると「全部コピーできたか」が分からない */
.sg-subinv__url {
    width: 100%;
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f7f9fc;
}
.sg-subinv__actions { display: flex; gap: 8px; margin-top: 12px; }
.sg-subinv__actions .sg-btn { flex: 1; }
.sg-subinv__status { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--color-primary); min-height: 1.2em; }
.sg-subinv__note { margin: 12px 0 0; font-size: 12px; line-height: 1.8; color: var(--color-text-muted); }
.sg-subinv__empty { font-size: 13px; line-height: 1.9; color: var(--color-text-muted); margin: 0; }

.sg-subinv__people { list-style: none; margin: 0; padding: 0; }
.sg-subinv__person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}
.sg-subinv__person:last-child { border-bottom: 0; }
.sg-subinv__person.is-revoked { opacity: .55; }
.sg-subinv__person-main { flex: 1; min-width: 0; }
.sg-subinv__person-name { display: block; font-size: 15px; font-weight: 700; }
.sg-subinv__person-meta { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.sg-subinv__badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    color: #b32d2e;
    font-size: 11px;
    font-weight: 700;
}
/* 「利用を止める」は押し間違えたくないボタン。目立たせず、押せることは分かる見た目にする */
.sg-subinv__revoke {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid #e6b3b8;
    color: #b32d2e;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}
.sg-subinv__revoke:disabled { opacity: .5; cursor: default; }

/* ================================================================
   確認するだけのページ（/my-stores/ ・ /my-contract/）
   ★予約や申し込みのボタンは置かない。見るためのページなので、
     主役は「読みやすさ」。カードを並べ、押せるものは末尾に1つだけにする。
   ================================================================ */
.sg-mypage { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-mypage__title { font-size: 18px; margin: 8px 0 16px; }
.sg-mypage__loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 13px; }

.sg-mypage__stop {
    background: #fdf6f6;
    border: 1px solid #e6b3b8;
    border-radius: 8px;
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.9;
}

.sg-mypage__card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 16px;
}
.sg-mypage__card-title {
    font-size: 15px; font-weight: 700; margin: 0 0 12px;
    padding-left: 10px; border-left: 4px solid var(--color-primary);
}
/* 申し込み済みの予定は「これから起きること」。見落とさないよう色を変える */
.sg-mypage__card--scheduled { border-left: 4px solid var(--color-gold); }
.sg-mypage__card--code { text-align: center; }

/* 会員IDは店頭で読み上げるもの。等幅・大きめ・字間を空けて読み間違いを防ぐ */
.sg-mypage__code {
    font-family: monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    margin: 4px 0 8px;
}

.sg-mypage__big { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--color-primary); }
.sg-mypage__meta { font-size: 13px; line-height: 1.8; color: var(--color-text-muted); margin: 6px 0 0; }
.sg-mypage__note { font-size: 12px; line-height: 1.8; color: var(--color-text-muted); margin: 12px 0 0; }
.sg-mypage__warn {
    font-size: 13px; line-height: 1.8; margin: 8px 0 0;
    padding: 10px 12px; border-radius: 8px;
    background: #fdf6f6; border: 1px solid #e6b3b8; color: #9E4A32;
}
.sg-mypage__notice {
    background: #fdf6f6; border: 1px solid #e6b3b8; border-radius: var(--radius-md);
    padding: 14px 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.8;
}

/* ラベルと値。狭い画面でも折り返して読めるよう、横並びは固定しない */
.sg-mypage__row {
    display: flex; flex-wrap: wrap; gap: 4px 12px;
    padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.sg-mypage__row:last-child { border-bottom: 0; }
.sg-mypage__row-label { flex: 0 0 8.5em; font-size: 13px; color: var(--color-text-muted); }
.sg-mypage__row-value { flex: 1 1 12em; font-size: 15px; font-weight: 700; }
.sg-mypage__row-note { display: block; font-size: 12px; font-weight: 400; color: var(--color-text-muted); }

/* カードの中に置くボタン（ご家族・従業員のご登録へ）。文章に貼り付かないよう間を空ける */
.sg-mypage__card .sg-btn-sub { margin-top: 12px; }

.sg-mypage__pref + .sg-mypage__pref { margin-top: 14px; }
.sg-mypage__pref-name { font-size: 13px; font-weight: 700; margin: 0 0 6px; color: var(--color-text); }
.sg-mypage__pref-count {
    display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
    background: var(--color-bg); color: var(--color-text-muted); font-size: 11px; font-weight: 700;
}
.sg-mypage__stores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sg-mypage__stores li {
    font-size: 13px; padding: 5px 10px; border-radius: 6px;
    background: var(--color-bg); border: 1px solid var(--color-border);
}

.sg-mypage .sg-btn, .sg-mypage .sg-btn-sub { display: block; width: 100%; text-align: center; }

/* ================================================================
   プラン変更（/plan-change/）
   ★選べないプランも一覧に残す。消すと「なぜ無いのか」が分からず問い合わせになる。
     グレーにして、いつから選べるかを添える。
   ================================================================ */
.sg-pc { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-pc__title { font-size: 18px; margin: 8px 0 16px; }
.sg-pc__loading { text-align: center; padding: 60px 20px; color: var(--color-text-muted); font-size: 13px; }
.sg-pc__stop {
    background: #fdf6f6; border: 1px solid #e6b3b8; border-radius: 8px;
    padding: 18px 16px; font-size: 14px; line-height: 1.9;
}

/* 申し込み済みの予定。重ねて申し込ませないよう、いちばん上で目立たせる */
.sg-pc__pending {
    background: #fffaf0; border: 1px solid var(--color-gold); border-radius: var(--radius-md);
    padding: 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.8;
}

.sg-pc__current {
    background: var(--color-white); border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary); border-radius: var(--radius-md);
    padding: 16px; margin-bottom: 16px;
}
.sg-pc__current-label { display: block; font-size: 11px; letter-spacing: .08em; color: var(--color-text-muted); }
.sg-pc__current-name  { display: block; font-size: 18px; font-weight: 800; margin-top: 4px; color: var(--color-primary); }
.sg-pc__current-price { display: block; font-size: 14px; font-weight: 700; margin-top: 2px; }
.sg-pc__current-store { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }

.sg-pc__lead { font-size: 13px; line-height: 1.9; margin: 0 0 16px; }
.sg-pc__list { display: grid; gap: 12px; }

.sg-pc__card {
    background: var(--color-white); border: 1px solid var(--color-border);
    border-radius: var(--radius-md); padding: 16px;
}
/* 選べないプランは沈めるが、読めなくはしない */
.sg-pc__card.is-locked { background: #f7f9fc; opacity: .75; }

.sg-pc__card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-pc__card-name { font-size: 16px; font-weight: 700; }
.sg-pc__badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
}
.sg-pc__badge.is-up   { background: #e7f6ee; border: 1px solid #5cb98a; color: #1c7a4f; }
.sg-pc__badge.is-down { background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-text-muted); }

.sg-pc__card-price { font-size: 20px; font-weight: 800; margin-top: 8px; color: var(--color-primary); }
.sg-pc__card-price span { font-size: 12px; font-weight: 400; color: var(--color-text-muted); }
/* 料金が引けなかったとき（店舗の設定漏れ）。金額と同じ大きさで出すと目立ちすぎる */
.sg-pc__card-price.is-empty { font-size: 13px; font-weight: 400; color: var(--color-text-muted); }
.sg-pc__card-desc  { font-size: 13px; line-height: 1.8; color: var(--color-text-muted); margin: 8px 0 0; }
.sg-pc__card-month { font-size: 12px; color: var(--color-text-muted); margin: 10px 0 8px; }
.sg-pc__card-locked {
    margin: 10px 0 0; padding: 10px 12px; border-radius: 8px;
    background: #fdf6f6; border: 1px solid #e6b3b8; color: #9E4A32;
    font-size: 13px; line-height: 1.7;
}
.sg-pc__card .sg-btn { display: block; width: 100%; text-align: center; }

.sg-pc__note { font-size: 12px; line-height: 1.9; color: var(--color-text-muted); margin: 16px 0 0; }

.sg-pc__done { text-align: center; padding-top: 12px; }
.sg-pc__done-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.sg-pc__done .sg-btn { display: block; width: 100%; text-align: center; margin-top: 16px; }
/* 契約の形が違うプラン（個人↔ファミリー↔法人）。金額の高い・安いとは別軸なので色も分ける */
.sg-pc__badge.is-other { background: #fffaf0; border: 1px solid var(--color-gold); color: #8a6d1f; }

/* ================================================================
   CS窓口（/cs/）
   ★お客さま向けページではない。社内の方が電話をしながら使う。
     見た目より「探しやすさ・押し間違えなさ」を優先する。
   ================================================================ */
.sg-cs { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
.sg-cs__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sg-cs__title { font-size: 20px; margin: 8px 0; }
.sg-cs__who { font-size: 12px; color: var(--color-text-muted); margin: 0; }
.sg-cs__lead { font-size: 13px; line-height: 1.9; margin: 8px 0 20px; }
.sg-cs__sub { font-size: 15px; font-weight: 700; margin: 28px 0 12px; padding-left: 10px; border-left: 4px solid var(--color-primary); }
.sg-cs__hint { font-size: 12px; line-height: 1.8; color: var(--color-text-muted); margin: 6px 0 0; }

.sg-cs__stop {
    background: #fdf6f6; border: 1px solid #e6b3b8; border-radius: var(--radius-md);
    padding: 20px 16px; font-size: 14px; line-height: 1.9;
}
.sg-cs__stop .sg-btn { display: inline-block; margin-top: 12px; }

/* 保存の結果・警告。★出たことに気づけることが最優先なので、色をはっきり分ける */
.sg-cs__notice {
    border-radius: var(--radius-md); padding: 14px 16px; margin: 0 0 12px;
    font-size: 14px; line-height: 1.8;
    background: var(--color-white); border: 1px solid var(--color-border);
}
.sg-cs__notice.is-ok   { background: #e7f6ee; border-color: #5cb98a; }
.sg-cs__notice.is-warn { background: #fffaf0; border-color: var(--color-gold); }
.sg-cs__notice.is-ng   { background: #fdecec; border-color: #e0556b; }
.sg-cs__notice ul { margin: 8px 0 0 1.4em; }

.sg-cs__search { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; }
.sg-cs__label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

.sg-cs input[type=text], .sg-cs input[type=search], .sg-cs select {
    width: 100%; padding: 12px; font-size: 16px;   /* 16px 未満だとiOSで拡大される */
    border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white);
    font-family: var(--font-base); color: var(--color-text);
}
.sg-cs input:focus, .sg-cs select:focus {
    outline: 2px solid var(--color-primary); outline-offset: -1px; border-color: var(--color-primary);
}

/* ★共通の .sg-btn は「幅いっぱいの縦積みボタン」（display:block / width:100%）。
     そのまま横に並べると**入力欄を押し潰す**ので、この画面では打ち消す。
     色も .sg-btn 単体では付かないので、ここで指定する。 */
.sg-cs .sg-btn {
    display: inline-block; width: auto;
    background: var(--color-primary); color: var(--color-white);
    padding: 12px 24px; font-size: 15px;
}
.sg-cs__search-row { display: flex; gap: 8px; align-items: stretch; }
.sg-cs__search-row input { flex: 1 1 auto; min-width: 0; }
.sg-cs__search-row .sg-btn { flex: 0 0 auto; white-space: nowrap; }

/* 検索結果。1件ずつが押しやすい大きさであること */
.sg-cs__hits { list-style: none; margin: 0; padding: 0; }
.sg-cs__hits li { border-bottom: 1px solid var(--color-border); }
.sg-cs__hits a { display: block; padding: 14px 4px; text-decoration: none; color: var(--color-text); }
.sg-cs__hits a:hover { background: var(--color-bg); opacity: 1; }
.sg-cs__hit-name { display: block; font-size: 16px; font-weight: 700; }
.sg-cs__hit-meta { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* 見るだけの項目 */
.sg-cs__facts {
    background: var(--color-white); border: 1px solid var(--color-border);
    border-radius: var(--radius-md); padding: 8px 16px; margin: 0;
}
.sg-cs__facts dt { font-size: 12px; color: var(--color-text-muted); padding-top: 12px; }
.sg-cs__facts dd { font-size: 15px; font-weight: 700; margin: 2px 0 12px; border-bottom: 1px solid var(--color-border); padding-bottom: 12px; }
.sg-cs__facts dd:last-child { border-bottom: 0; }
.sg-cs__liny {
    display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
    background: var(--color-bg); border: 1px solid var(--color-border);
    font-size: 12px; font-weight: 400;
}

.sg-cs__form { margin-top: 8px; }
.sg-cs__field { margin-bottom: 18px; }
.sg-cs__check { display: block; margin: 8px 0; font-size: 14px; }
.sg-cs__check input { margin-right: 6px; }
/* 送信だけは全幅に戻す（押し間違えを避けたい・迷わせたくない） */
.sg-cs .sg-btn.sg-cs__submit { display: block; width: 100%; margin-top: 24px; padding: 16px; font-size: 16px; }
.sg-cs__stop .sg-btn { margin-top: 12px; }

/* CS窓口：狭い画面では検索ボタンを下に落とす（横に並べると入力欄が読めなくなる） */
@media (max-width: 480px) {
    .sg-cs__search-row { flex-wrap: wrap; }
    .sg-cs__search-row input { flex: 1 1 100%; }
    .sg-cs__search-row .sg-btn { flex: 1 1 100%; }
}

/* CS窓口：契約に関わる項目の枠。★お名前を直すのと同じ気軽さで触られないよう色を変える */
.sg-cs__danger {
    background: #fdf6f6; border: 1px solid #e6b3b8; border-radius: var(--radius-md);
    padding: 14px 16px; margin: 0 0 16px; font-size: 13px; line-height: 1.8;
}
.sg-cs__danger-title { font-weight: 700; color: #9E4A32; margin: 0 0 6px; }
.sg-cs__danger p { margin: 0; }

/* 一覧の状態バッジ（会員／休会／退会が一目で分かるように） */
.sg-cs__hit-status {
    display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
    background: var(--color-bg); border: 1px solid var(--color-border);
    font-size: 11px; font-weight: 700; color: var(--color-text-muted);
    vertical-align: middle;
}

/* 店舗一覧のページ送り */
.sg-cs__pager { display: flex; gap: 8px; margin-top: 16px; }
.sg-cs__pager .sg-btn { flex: 1 1 0; text-decoration: none; }

/* CS窓口：いま予約できるか（いちばん上に出す。電話中に最初に見るもの） */
.sg-cs__check-box {
    border-radius: var(--radius-md); padding: 14px 16px; margin: 0 0 20px;
    border: 1px solid var(--color-border); background: var(--color-white);
}
.sg-cs__check-box.is-ok { background: #e7f6ee; border-color: #5cb98a; }
.sg-cs__check-box.is-ng { background: #fdf6f6; border-color: #e6b3b8; }
.sg-cs__check-label { margin: 0; font-size: 15px; }
.sg-cs__check-why   { margin: 6px 0 0; font-size: 13px; line-height: 1.8; }

/* CS窓口：対応メモの入力欄 */
.sg-cs textarea {
    width: 100%; padding: 12px; font-size: 16px; line-height: 1.7;
    border: 1px solid var(--color-border); border-radius: 8px;
    font-family: var(--font-base); color: var(--color-text); resize: vertical;
}
.sg-cs textarea:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }

/* CS窓口：対応履歴 */
.sg-cs__log { list-style: none; margin: 0; padding: 0; }
.sg-cs__log li {
    padding: 12px 0; border-bottom: 1px solid var(--color-border);
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
}
.sg-cs__log li:last-child { border-bottom: 0; }
.sg-cs__log-at     { font-size: 12px; color: var(--color-text-muted); }
.sg-cs__log-by     { font-size: 12px; color: var(--color-text-muted); text-align: right; }
.sg-cs__log-action { font-size: 14px; font-weight: 700; grid-column: 1 / -1; }
.sg-cs__log-note   { font-size: 13px; line-height: 1.8; grid-column: 1 / -1; }

/* CS窓口：項目グループ（アコーディオン）
   ★項目が50を超えるので既定は閉じる。開いたものだけを相手にする。 */
.sg-cs__group {
    background: var(--color-white); border: 1px solid var(--color-border);
    border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden;
}
.sg-cs__group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 14px 16px; cursor: pointer; font-weight: 700; font-size: 15px;
    background: #f7f9fc; list-style: none;
}
.sg-cs__group-head::-webkit-details-marker { display: none; }
.sg-cs__group-head::after { content: '＋'; color: var(--color-text-muted); font-weight: 400; }
.sg-cs__group[open] .sg-cs__group-head::after { content: '−'; }
.sg-cs__group-count {
    margin-left: auto; margin-right: 8px; padding: 1px 8px; border-radius: 999px;
    background: var(--color-bg); border: 1px solid var(--color-border);
    font-size: 11px; font-weight: 700; color: var(--color-text-muted);
}
.sg-cs__group-body { padding: 16px; }
.sg-cs__group-note {
    background: #fdf6f6; border: 1px solid #e6b3b8; border-radius: 8px;
    padding: 12px 14px; margin: 0 0 16px; font-size: 13px; line-height: 1.8; color: #9E4A32;
}
/* 契約・子ユーザー・予定は、閉じていても危険と分かるようにする */
.sg-cs__group.is-danger { border-color: #e6b3b8; }
.sg-cs__group.is-danger .sg-cs__group-head { background: #fdf6f6; color: #9E4A32; }

.sg-cs__checks { display: grid; gap: 4px; }

/* ---- CS窓口：STORESのご契約状況（見るだけ） ---- */
.sg-cs__stores {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 24px;
  background: #fafbfc;
}
.sg-cs__stores .sg-cs__sub { margin-top: 0; }
.sg-cs__stores .sg-cs__sub small { font-weight: 400; color: var(--color-text-muted); }
.sg-cs__stores-refresh {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.sg-cs__stores-refresh .sg-cs__hint { margin: 0; }
.sg-cs__subs {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 400;
}
.sg-cs__subs th,
.sg-cs__subs td {
  border: 1px solid var(--color-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.sg-cs__subs th { background: #f1f3f5; font-size: 12px; white-space: nowrap; }
.sg-cs__subs small { color: var(--color-text-muted); }
.sg-cs__subs tr.is-alert { background: #fdf6f6; }
.sg-cs__unpaid { color: #b3262f; }
.sg-cs__cand {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px;
  margin: 0 0 12px;
  background: #fff;
}
.sg-cs__cand-head { margin: 0 0 8px; font-size: 14px; }
.sg-cs__cand-head code {
  background: #f1f3f5;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.sg-cs__warn { color: #b3262f; }
.sg-cs__more { margin: 0; }
.sg-cs__more > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 6px 0;
}

/* ================================================================
   法人の契約手続き（/corporate-plan/）2026-08-31
   ★お問い合わせ（/corporate/）と同じ .sg-corp の中で使う。
     器のスタイルはあちらのものをそのまま継承する。
   ================================================================ */
.sg-corp__company { font-weight: 700; font-size: 15px; margin: 0 0 16px; }

.sg-corp__applied {
  font-size: 13px; line-height: 1.8; margin: 0 0 16px;
  padding: 10px 12px; border-radius: 6px;
  background: #FFF7E8; border: 1px solid #E8D3A8;
}

.sg-corp__card { margin-bottom: 24px; }
.sg-corp__card-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.sg-corp__hint { font-size: 12px; color: var(--color-text-muted); line-height: 1.8; margin: 0 0 12px; }

/* ---- プランの選択 ---- */
.sg-corp__plans { display: grid; gap: 10px; }

.sg-corp__plan {
  display: block; width: 100%; text-align: left;
  padding: 14px 16px; border: 2px solid #E3E3E3; border-radius: 10px;
  background: #fff; cursor: pointer; font-family: inherit;
}
.sg-corp__plan.is-on { border-color: var(--color-primary, #1B3A5C); background: #F5F9FD; }

.sg-corp__plan-name   { display: block; font-weight: 700; font-size: 15px; }
.sg-corp__plan-slots  { display: block; font-size: 13px; color: #1B3A5C; margin-top: 2px; }
.sg-corp__plan-amount { display: block; font-size: 14px; margin-top: 4px; }
.sg-corp__plan-desc   { display: block; font-size: 12px; color: var(--color-text-muted); line-height: 1.7; margin-top: 6px; }

/* ---- 期間の選択 ---- */
.sg-corp__terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.sg-corp__term {
  padding: 12px 8px; border: 2px solid #E3E3E3; border-radius: 10px;
  background: #fff; cursor: pointer; font-family: inherit; text-align: center;
}
.sg-corp__term.is-on { border-color: var(--color-primary, #1B3A5C); background: #F5F9FD; }

/* ★押せない理由を見せたままにする。一覧から消すと「なぜ無いのか」が分からない */
.sg-corp__term[disabled] { opacity: .5; cursor: not-allowed; }

.sg-corp__term-name { display: block; font-weight: 700; font-size: 14px; }
.sg-corp__term-pay  { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 4px; line-height: 1.5; }
.sg-corp__term-na   { display: block; font-size: 11px; color: #9E4A32; margin-top: 4px; }

.sg-corp__summary {
  font-size: 14px; line-height: 1.9; margin: 0 0 12px;
  padding: 12px 14px; border-radius: 8px; background: #F4F6F8;
}

.sg-corp__done-next { font-size: 14px; line-height: 1.9; margin: 20px 0 10px; }

@media (max-width: 380px) {
  .sg-corp__terms { grid-template-columns: 1fr; }
}

/* 期間ボタンの金額（法人の契約手続き）2026-08-31 */
.sg-corp__term-money { display: block; font-size: 14px; font-weight: 700; margin-top: 4px; }
.sg-corp__term-save  { display: block; font-size: 10px; color: var(--color-text-muted); margin-top: 3px; line-height: 1.4; }
.sg-corp__summary-note { font-size: 12px; color: var(--color-text-muted); }

/* ================================================================
   子ユーザー登録：施設内の注意点（2026-08-31）
   ★本文が長くなるので枠内でスクロールさせる。
     ページ全体が伸びると、下の同意チェックと登録ボタンまで
     たどり着けたか分からなくなる。
   ================================================================ */
.sg-subreg__rules {
  margin: 20px 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
}
.sg-subreg__rules-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.sg-subreg__rules-body {
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  line-height: 1.9;
  padding: 12px;
  border: 1px solid #E3E3E3;
  border-radius: 8px;
  background: #FAFBFC;
  margin-bottom: 12px;
}
.sg-subreg__rules-body p  { margin: 0 0 10px; }
.sg-subreg__rules-body ul,
.sg-subreg__rules-body ol { margin: 0 0 10px; padding-left: 1.4em; }
.sg-subreg__rules-body li { margin-bottom: 6px; }

/* 子ユーザー登録：すでに登録済みのご案内（2026-08-31） */
.sg-subreg__done-list {
  margin: 10px 0;
  padding: 10px 12px 10px 28px;
  border-radius: 8px;
  background: #F4F6F8;
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

/* ================================================================
   入力して絞り込むプルダウン（assets/js/sg-combobox.js）
   担当スタッフ・レッスンコーチなど、選択肢が数十件ある select を
   「文字を入力すると候補が出る欄」に置き換えたときの見た目。
   ★候補はブラウザ標準の datalist ではなく自前で出す
     （iPhone のLINE画面で datalist の候補が見えにくいため）。
   ================================================================ */
.sg-combobox { position: relative; }
.sg-combobox__select {
    /* 値の受け渡し用に DOM には残す。見せない・触らせない */
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.sg-combobox__sug {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    background: #fff;
    border: 1px solid #DDE3F0;
    border-radius: 8px;
    max-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 6px 18px rgba(12, 50, 128, .12);
}
.sg-combobox__sug.is-open { display: block; }
.sg-combobox__row {
    padding: 12px 13px;
    font-size: 15px;
    border-bottom: 1px solid #EDF1F5;
    cursor: pointer;
}
.sg-combobox__row:last-child { border-bottom: none; }
.sg-combobox__row:active,
.sg-combobox__row:hover { background: #EDF4FB; }
.sg-combobox__row.is-current { font-weight: 700; color: #0C3280; }
.sg-combobox__row.is-none {
    color: #5A6472;
    font-size: 13px;
    cursor: default;
    background: none;
}
.sg-combobox__picked {
    margin: 4px 0 0;
    font-size: 12px;
    color: #0C3280;
    font-weight: 700;
    min-height: 1em;
}
.sg-combobox__picked:empty { display: none; }

/* ================================================================
   マーケティング画面（/marketing/・inc/marketing-console.php）
   CS窓口（.sg-cs）の器を借りて、表とグラフだけ足す。
   ================================================================ */
.sg-mk { max-width: 960px; }
.sg-mk__built { font-size: 12px; color: var(--color-text-muted); }
.sg-mk__refresh { font-size: 12px; margin-left: 8px; }

.sg-mk__nav {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px;
    position: sticky; top: 0; z-index: 5; padding: 8px 0;
    background: var(--color-bg, #F5F7FC);
}
.sg-mk__nav a {
    display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--color-white); border: 1px solid var(--color-border); color: var(--color-primary);
    text-decoration: none;
}
.sg-mk__nav a:hover { background: var(--color-primary); color: var(--color-white); opacity: 1; }

.sg-mk__sec { margin-bottom: 36px; }
.sg-mk__h4 { font-size: 14px; font-weight: 700; margin: 22px 0 8px; }
.sg-mk__h4 small { font-weight: 400; font-size: 12px; color: var(--color-text-muted); margin-left: 8px; }
.sg-mk__kpi { font-size: 14px; margin: 10px 0; }
.sg-mk__kpi strong { font-size: 18px; color: var(--color-primary); }
.sg-mk__empty { font-size: 13px; color: var(--color-text-muted); margin: 6px 0; }
.sg-mk__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.sg-mk__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* いまの人数（ファネル） */
.sg-mk__funnel { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.sg-mk__step {
    flex: 1 1 110px; min-width: 110px; padding: 12px 10px; border-radius: var(--radius-md);
    background: var(--color-white); border: 1px solid var(--color-border); text-align: center;
}
.sg-mk__step-label { display: block; font-size: 12px; color: var(--color-text-muted); }
.sg-mk__step-num   { display: block; font-size: 22px; font-weight: 800; color: var(--color-primary); margin: 2px 0; }
.sg-mk__step-pct   { display: block; font-size: 11px; color: var(--color-text-muted); }
.sg-mk__step--member  { border-color: var(--color-primary); border-width: 2px; }
.sg-mk__step--withdrawn .sg-mk__step-num { color: #9E4A32; }

/* 表 */
.sg-mk__table {
    width: 100%; border-collapse: collapse; background: var(--color-white);
    border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden;
    font-size: 13px; margin: 6px 0 4px;
}
.sg-mk__table th, .sg-mk__table td { padding: 9px 10px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.sg-mk__table thead th { font-size: 11px; color: var(--color-text-muted); background: var(--color-bg, #F5F7FC); font-weight: 700; }
.sg-mk__table tbody th { font-weight: 700; white-space: nowrap; }
.sg-mk__table tr:last-child th, .sg-mk__table tr:last-child td { border-bottom: 0; }
.sg-mk__table tr.is-zero { opacity: .5; }
.sg-mk__num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sg-mk__pct { text-align: right !important; white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.sg-mk__barcell { width: 34%; }
.sg-mk__table--months td { min-width: 96px; }

/* 横棒 */
.sg-mk__bar { height: 10px; border-radius: 5px; background: #EDF1F5; overflow: hidden; margin-top: 4px; }
.sg-mk__bar span { display: block; height: 100%; background: var(--color-primary); border-radius: 5px; }
.sg-mk__bar--new span      { background: #9AA8C7; }
.sg-mk__bar--consider span { background: #5B7DBE; }
.sg-mk__bar--joined span   { background: var(--color-primary); }

/* SGPT：軸の比重 */
.sg-mk__axiscell { width: 44%; }
.sg-mk__axis { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #EDF1F5; }
.sg-mk__axis-a { background: var(--color-primary); }
.sg-mk__axis-b { background: #9AA8C7; }
.sg-mk__axis-legend { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: #4B5563; }
.sg-mk__verdict { white-space: nowrap; }
.sg-mk .is-ok   { color: #0B6E4F; }
.sg-mk .is-warn { color: #C77700; }
.sg-mk .is-ng   { color: #B4232A; }
.sg-mk .is-na   { color: #8A94A6; }

.sg-mk__chip {
    display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 10px;
    background: #EDF4FB; font-size: 12px; white-space: nowrap;
}

/* 診断の切り替え */
.sg-mk__toggles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 4px; }
.sg-mk__toggle {
    display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    border: 1px solid var(--color-border); background: var(--color-white); color: var(--color-text); text-decoration: none;
}
.sg-mk__toggle.is-on { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.sg-mk__toggles-sep { width: 12px; }

@media (max-width: 600px) {
    .sg-mk__barcell { display: none; }
    .sg-mk__axiscell { width: auto; }
    .sg-mk__verdict { white-space: normal; }
}
