/* スポーツアシスタント 会員ページ — 配色は GAS 版の会員ページ（portalPage.html）と新HP（青×黄）に合わせる
   青 #1F6FE0 / 紺 #15284A / 薄青 #EAF3FF / 黄 #FFC828（マーカー・面のみ） / 本文 #243043 / 白
   書体: 見出し M PLUS Rounded 1c 800（見出しのみ）・本文 Noto Sans JP */
:root {
  --tint: #EAF3FF;
  --tint-2: #F5F9FF;
  --brand: #1F6FE0;
  --strong: #15284A;
  --accent: #FFC828;
  --warm: #FFF6D6;
  --ink: #243043;
  --sub: #5D6B84;
  --line: #D5E2F5;
  --field-line: #B4C7E4;
  --bg: #FFFFFF;
  --danger: #B3261E;
  --danger-bg: #FDECEA;
  --radius: 12px;
  --focus: 0 0 0 3px rgba(31, 111, 224, .4);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.75; font-feature-settings: "palt";
}
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 上部 */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--bg); border-bottom: 4px solid var(--brand);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--strong); min-width: 0; }
.logo { height: 28px; width: auto; display: block; }
.brand-name { line-height: 1.1; padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name small { display: block; font-weight: 700; font-size: 12px; color: var(--sub); }
.nav { display: flex; align-items: center; gap: 14px; font-size: 13px; flex-shrink: 0; }
.nav a, .nav .linklike { white-space: nowrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--brand); font-weight: 700; }
.inline { display: inline; }
.linklike { background: none; border: 0; padding: 4px 0; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike.danger { color: var(--danger); }
.nav .linklike { text-decoration: none; color: var(--sub); border-bottom: 2px solid transparent; }
.nav .linklike:hover { color: var(--ink); }

/* ページ */
.page { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
.hero { padding: 8px 0 18px; }
.hero.compact { padding-bottom: 10px; }
.title { margin: 0 0 10px; font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif; font-weight: 800; font-size: 26px; line-height: 1.3; color: var(--strong); }
/* マーカーは単色＋background-size（transparent を挟むグラデーションは PDF・一部の表示で黒帯になるため使わない） */
.marker { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 100% 32%; background-position: 0 88%; padding: 0 2px; }
.lead { margin: 0; color: var(--sub); font-size: 14px; }
.who { margin: 6px 0 0; font-size: 14px; }
.back { display: inline-block; margin-bottom: 8px; font-size: 13px; text-decoration: none; color: var(--sub); }
.sec-title { margin: 30px 0 10px; font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif; font-weight: 800; font-size: 18px; color: var(--strong); }

/* 通知 */
.notice { background: var(--tint); border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 14px; font-size: 14px; }
.notice p { margin: 4px 0 0; }
.notice.warm { background: var(--warm); border-left-color: var(--accent); }
.alert { background: var(--danger-bg); border-left: 4px solid var(--danger); color: #5a1a15; padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 14px; font-size: 14px; }
.alert.soft { background: var(--warm); border-left-color: #E0A800; color: #5c4400; }
.small { font-size: 12px; color: var(--sub); }
.empty { padding: 28px 16px; text-align: center; color: var(--sub); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { margin: 0 0 6px; }

/* フォーム */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.form .field { display: block; margin: 16px 0 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field > span em { font-style: normal; font-weight: 400; color: var(--sub); margin-left: 6px; }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { border-color: var(--brand); }
.btn {
  display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 15px; padding: 11px 18px; line-height: 1.3;
}
.btn:hover { background: #1859B8; border-color: #1859B8; }
.btn.wide { width: 100%; padding: 14px; font-size: 16px; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--tint); }
.btn.small-btn { padding: 7px 12px; font-size: 13px; }
.btn.disabled, .btn[disabled] { background: #E6EAF1; border-color: #E6EAF1; color: #8891A1; cursor: default; }
.form > .btn { width: 100%; margin-top: 4px; }
.sub-actions { margin: 14px 0 22px; text-align: center; }
.sub-actions .btn { width: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--warm); cursor: pointer; margin: 12px 0; font-size: 14px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--brand); }

/* 安心・きまり */
.trust, .howto { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
.trust h2, .howto h2 { font-size: 14px; margin: 0 0 8px; color: var(--strong); }
.trust ul, .howto ul { margin: 0; padding-left: 1.2em; font-size: 13px; color: var(--sub); }
.trust li, .howto li { margin: 4px 0; }

/* ホーム: これからの予定 */
.plans { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plan { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; background: #fff; }
.plan + .plan { border-top: 1px solid var(--line); }
.plan-date { font-weight: 700; font-size: 15px; color: var(--strong); }
.plan-kind { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.plan-kind.absence { background: var(--danger-bg); color: #8C1D17; }
.plan-kind.transfer { background: var(--tint); color: #1859B8; }
.plan-kind.join { background: var(--warm); color: #6B4E00; }
.plan-body { grid-column: 1; font-size: 14px; }
.plan-sub { grid-column: 1; font-size: 12px; color: var(--sub); }
.plan-actions { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; justify-content: center; }

/* ホーム: お子さまごと */
.child { margin: 18px 0 26px; }
.child-name { margin: 0 0 8px; font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif; font-weight: 800; font-size: 20px; color: var(--strong); padding-left: 12px; border-left: 6px solid var(--brand); line-height: 1.3; }
.child-name small { font-family: "Noto Sans JP", sans-serif; font-weight: 400; font-size: 13px; color: var(--sub); }
.classes { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.class-row { display: flex; gap: 12px; align-items: center; padding: 14px 14px; background: #fff; }
.class-row + .class-row { border-top: 1px solid var(--line); }
.class-main { flex: 1; min-width: 0; }
.class-title { font-weight: 700; font-size: 16px; }
.class-meta { font-size: 12px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pill { display: inline-block; background: var(--tint); color: var(--strong); border-radius: 999px; padding: 0 8px; font-size: 11px; }
.class-next { margin-top: 4px; font-size: 13px; }
.class-next em { font-style: normal; color: #8C5A00; font-size: 12px; margin-left: 4px; }
.class-action .btn { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
.class-note { display: inline-block; font-size: 13px; color: #5B6577; white-space: nowrap; }

/* 都度グループ: ほかに参加できる日程 */
.group { margin: 12px 0 0; padding: 12px 14px; background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--radius); }
.group h3 { margin: 0 0 8px; font-size: 14px; color: var(--strong); }
.group-item + .group-item { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.group-title { font-weight: 700; font-size: 14px; }
.group-guide { font-size: 12px; color: var(--sub); margin: 2px 0 0; }
.group-dates { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.group-dates li { font-size: 13px; }
.chip { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.chip.done { background: var(--warm); border-color: var(--accent); font-weight: 700; }
button.chip { font: inherit; font-size: 13px; cursor: pointer; color: var(--brand); border-color: var(--brand); font-weight: 700; }
button.chip:hover { background: var(--tint); }

/* 日にちを選ぶ（お休み・振替） */
.dates { border: 0; padding: 0; margin: 0 0 6px; }
.dates legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.date { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.date:has(input:checked) { border-color: var(--brand); background: var(--tint); box-shadow: inset 0 0 0 1px var(--brand); }
.date.off { color: #9199A8; background: #F6F7F9; cursor: default; }
.date input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.date-label { font-weight: 700; font-size: 15px; }
.date-note { margin-left: auto; font-size: 12px; color: var(--sub); }
.option { margin: 0 0 16px; padding: 12px 14px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint-2); }
.option-title { font-weight: 700; font-size: 15px; }
.option-meta { font-size: 12px; color: var(--sub); margin-bottom: 8px; }
.fee { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #3D2C00; font-size: 12px; font-weight: 700; }

/* 履歴 */
.history { list-style: none; margin: 0; padding: 0; }
.hist { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist-date { grid-column: 1 / -1; font-weight: 700; color: var(--strong); font-size: 14px; }
.hist.canceled .hist-date, .hist.canceled .hist-title { color: #9199A8; text-decoration: line-through; }
.hist-title { font-size: 15px; }
.hist-note { font-size: 13px; color: var(--sub); }
.hist-meta { font-size: 12px; color: var(--sub); }
.hist-action { align-self: center; }

/* フッター */
.foot { max-width: 560px; margin: 0 auto; padding: 18px 16px 28px; font-size: 12px; color: var(--sub); border-top: 1px solid var(--line); }
.foot p { margin: 2px 0; }

@media (max-width: 600px) {
  .brand-name { display: none; }   /* 狭い画面ではロゴだけ */
}
@media (max-width: 420px) {
  .class-row { flex-direction: column; align-items: stretch; }
  .class-action .btn { width: 100%; }
  .nav { gap: 10px; }
}

/* LINEとつなぐ案内 */
.notice.line-link p { margin: 0 0 10px; }
.notice.line-link form.inline { margin-right: 12px; }

/* LINEミニアプリの入口の読み込み表示 */
.line-wait { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 96px; color: var(--strong); font-weight: 700; background: var(--tint-2); }
.line-wait[hidden] { display: none; }
.line-spinner { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: line-spin .8s linear infinite; }
@keyframes line-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .line-spinner { animation-duration: 2.4s; } }
#line-login .notice { margin-bottom: 14px; }
