/* 見守りお天気 共通スタイル（担当 A・ビルド不要）。docs/08 §9: 基本 18px・ボタン 48px 以上・状態は色＋文字 */
/* parents.css（担当 B）と billing.css（担当 E）は layouts/base が個別に読み込む。@import だと版番号（?v=）が付かず、更新してもブラウザに古いファイルが残る（2026-11-09 実例） */

:root {
  --c-bg: #f4f7fb;
  --c-surface: #ffffff;
  --c-text: #1f2a37;
  --c-muted: #556372;
  --c-border: #cfd8e3;
  --c-primary: #2b5c8a;
  --c-primary-dark: #1f4568;
  --c-primary-soft: #e3edf7;
  --c-danger: #b3261e;
  --c-danger-soft: #fbe9e7;
  --c-green: #2e7d32;   --c-green-soft: #e6f4e7;
  --c-yellow: #8a6100;  --c-yellow-soft: #fff4d6;
  --c-red: #b3261e;     --c-red-soft: #fbe9e7;
  --c-gray: #5f6b76;    --c-gray-soft: #eceff2;
  --radius: 10px;
}

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

html { font-size: 18px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
}

a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f2a900;
  outline-offset: 2px;
}

h1 { font-size: 1.6rem; line-height: 1.4; margin: 0 0 .8em; }
h2 { font-size: 1.3rem; line-height: 1.4; margin: 1.6em 0 .6em; }
h3 { font-size: 1.1rem; line-height: 1.4; margin: 1.2em 0 .4em; }
p { margin: 0 0 1em; }

/* レイアウト */
.container { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 560px; }

.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 64px; }
.site-logo { font-size: 1.2rem; font-weight: bold; color: var(--c-primary-dark); text-decoration: none; }
.site-logo img { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-nav a, .site-nav button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  font-size: 1rem; color: var(--c-primary-dark); text-decoration: none;
  background: none; border: 0; border-radius: var(--radius); cursor: pointer; font-family: inherit;
}
.site-nav a:hover, .site-nav button:hover { background: var(--c-primary-soft); }
.site-nav form { margin: 0; }
/* ログイン前のヘッダー: ログインを目立つボタンに（2026-11-10・スマホでただの文字に見えていた） */
.site-nav a.nav-login { gap: 6px; padding: 0 20px; border-radius: 999px; background: #1f4e79; color: #fff; font-weight: 700; letter-spacing: .04em; box-shadow: 0 4px 12px rgba(31, 78, 121, .22); }
.site-nav a.nav-login svg { width: 18px; height: 18px; flex: none; }
.site-nav a.nav-login:hover { background: #16324f; color: #fff; }
.site-nav a.nav-login:focus-visible { outline: 3px solid #f08a24; outline-offset: 2px; }
.site-nav a.nav-register { border: 2px solid #1f4e79; border-radius: 999px; font-weight: 700; }

main { padding: 28px 0 48px; }

.site-footer { border-top: 1px solid var(--c-border); background: var(--c-surface); padding: 20px 0 28px; font-size: .9rem; color: var(--c-muted); }
.site-footer nav { display: flex; gap: 6px 20px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* カード */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card > :last-child { margin-bottom: 0; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  font-size: 1rem; font-weight: bold; font-family: inherit; line-height: 1.3;
  color: var(--c-primary-dark); background: var(--c-surface);
  border: 2px solid var(--c-primary); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--c-primary-soft); }
.btn-primary { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.btn-primary:hover { color: #fff; background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-danger { color: #fff; background: var(--c-danger); border-color: var(--c-danger); }
.btn-danger:hover { color: #fff; background: #8c1d17; border-color: #8c1d17; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* フォーム */
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: bold; margin-bottom: 6px; }
.form-row .hint { display: block; font-size: .9rem; color: var(--c-muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; min-height: 52px; padding: 10px 14px;
  font-size: 1.05rem; font-family: inherit; color: var(--c-text);
  background: #fff; border: 2px solid var(--c-border); border-radius: var(--radius);
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: normal; cursor: pointer; }
.checkbox input { width: 26px; height: 26px; margin: 4px 0 0; flex: none; }
.field-error { display: block; color: var(--c-danger); font-weight: bold; margin-top: 6px; }
.is-invalid { border-color: var(--c-danger) !important; }

/* お知らせ */
.flash { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; border: 2px solid; }
.flash-success { background: var(--c-green-soft); border-color: var(--c-green); color: #1b4d1e; }
.flash-error { background: var(--c-danger-soft); border-color: var(--c-danger); color: #7a1a14; }
.flash-notice { background: #fff6da; border-color: #d99a00; color: #4d3800; }
.flash ul { margin: 0; padding-left: 1.2em; }

/* 状態バッジ（色＋文字） */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px; border: 2px solid;
  font-weight: bold; font-size: 1rem; line-height: 1.6;
}
.badge::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: currentColor; flex: none; }
.badge-green  { color: var(--c-green);  background: var(--c-green-soft);  border-color: var(--c-green); }
.badge-yellow { color: var(--c-yellow); background: var(--c-yellow-soft); border-color: var(--c-yellow); }
.badge-red    { color: var(--c-red);    background: var(--c-red-soft);    border-color: var(--c-red); }
.badge-gray   { color: var(--c-gray);   background: var(--c-gray-soft);   border-color: var(--c-gray); }

/* 表 */
.table { width: 100%; border-collapse: collapse; background: var(--c-surface); margin-bottom: 20px; }
.table th, .table td { border: 1px solid var(--c-border); padding: 12px 14px; text-align: left; vertical-align: top; }
.table th { background: var(--c-primary-soft); font-weight: bold; }
.table-wrap { overflow-x: auto; }

.muted { color: var(--c-muted); }
.text-center { text-align: center; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* 公開ページ */
.hero { background: var(--c-primary-dark); color: #fff; padding: 48px 0 52px; }
.hero h1 { font-size: 1.9rem; margin-bottom: .5em; }
.hero .lead { font-size: 1.2rem; margin-bottom: 1em; }
.hero .price { font-size: 1.1rem; background: rgba(255,255,255,.12); display: inline-block; padding: 6px 16px; border-radius: var(--radius); }
.hero .actions .btn { border-color: #fff; }
.hero .actions .btn-primary { background: #fff; color: var(--c-primary-dark); }
.hero .actions .btn-primary:hover { background: var(--c-primary-soft); }
.hero .actions .btn:not(.btn-primary) { color: #fff; background: transparent; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 18px 56px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.pair-code { font-size: 2.6rem; font-weight: bold; letter-spacing: .2em; text-align: center; padding: 16px; background: var(--c-primary-soft); border-radius: var(--radius); margin: 12px 0 20px; }
.legal h2 { font-size: 1.15rem; }
.legal dl { margin: 0; }
.legal dt { font-weight: bold; margin-top: 14px; }
.legal dd { margin: 0 0 6px; }
.draft-note { border: 2px dashed var(--c-yellow); background: var(--c-yellow-soft); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 20px; }

@media (max-width: 600px) {
  html { font-size: 17px; }
  .card { padding: 18px; }
  /* ヘッダー: ロゴの下にメニューを 1 行で並べる（折り返して 2 段になり、画面の 2 割を使っていた）。入りきらない時は横に送れる */
  .site-header .container { min-height: 0; padding-top: 8px; padding-bottom: 4px; gap: 2px; }
  .site-logo img { height: 32px; }
  .site-nav { width: 100%; flex-wrap: nowrap; gap: 0; justify-content: space-between; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a, .site-nav button { padding: 10px 8px; font-size: .84rem; white-space: nowrap; min-height: 44px; }
  .site-nav .nav-long { display: none; } /* 「サービスのトップ」→「トップ」（4 つを 1 行に収める） */
  .site-nav .nav-logout { display: none; } /* ログアウトはアカウントの画面に置く（5 つ目で右へはみ出していた） */
  /* ログイン前（メニューがログイン・新規登録だけ）は、ロゴと同じ行の右端に置く */
  .site-header .container:has(.nav-login) { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .site-nav:has(.nav-login) { width: auto; flex: none; gap: 6px; overflow: visible; }
  .site-header .container:has(.nav-login) .site-logo { min-width: 104px; flex: 1 1 auto; }
  .site-header .container:has(.nav-login) .site-logo img { height: 30px; }
  .site-nav a.nav-login, .site-nav a.nav-register { padding: 0 14px; font-size: .9rem; min-height: 44px; }
  .container { padding-left: 14px; padding-right: 14px; }
  h1 { font-size: 1.35rem; }
  .card > h2:first-child, .card > .parent-card-head:first-child { margin-top: 2px; }
  h2 { font-size: 1.15rem; margin-top: 1.2em; }
  .table th, .table td { padding: 8px 6px; font-size: .9rem; }
  .hero h1 { font-size: 1.55rem; }
  .actions .btn { width: 100%; }
}
@media (max-width: 360px) {
  .site-nav a.nav-login, .site-nav a.nav-register { padding: 0 10px; font-size: .84rem; }
  .site-nav:has(.nav-register) a.nav-login svg { display: none; }
}

/* 単独で置く文字リンク（パスワードを忘れた方・新規登録など）: 指で押せる高さにする */
a.text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* 上に戻るボタン（全ページ共通） */
.to-top { position: fixed; right: 12px; bottom: 12px; z-index: 50; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 64px; height: 64px; border-radius: 50%; background: #1f4e79; color: #fff; text-decoration: none; font-size: .62rem; font-weight: 700; line-height: 1.2; letter-spacing: 0; white-space: nowrap; box-shadow: 0 8px 20px rgba(31, 78, 121, .28); }
.to-top[hidden] { display: none; }
.to-top svg { width: 22px; height: 22px; }
.to-top:hover { color: #fff; background: #16324f; }
.to-top:focus-visible { outline: 3px solid #f08a24; outline-offset: 3px; }
/* スマホ幅: 文字「上に戻る」が丸からはみ出ていたので、丸を 60px にして文字は PC と同じ大きさにする（2026-11-11。丸の下の方は幅が狭い＝文字の下の端での丸の幅が文字の幅より広いこと） */
@media (max-width: 600px) { .to-top { width: 60px; height: 60px; gap: 1px; opacity: .92; } .to-top svg { width: 18px; height: 18px; } }
@media (min-width: 760px) { .to-top { right: 28px; bottom: 28px; } }
@media print { .to-top { display: none; } }

/* 解約の手続き（親を選ぶ） */
.cancel-all { padding: 12px 14px; background: #fdf3f2; border-radius: 10px; }
.cancel-list { list-style: none; margin: 12px 0 0; padding: 0 14px; }
.cancel-list li { padding: 8px 0; border-bottom: 1px solid #e3e8f0; }
.cancel-notes { margin: 18px 0; }
.cancel-notes h3 { font-size: 1rem; margin: 14px 0 4px; }

.cancel-when { margin: 22px 0 0; padding: 0; border: 0; display: grid; gap: 10px; }
.cancel-when legend { font-weight: 700; margin-bottom: 8px; }
.cancel-when-option { padding: 12px 14px; border: 1px solid #d5dde8; border-radius: 10px; }
.cancel-when-option small { color: #4b5768; }
.cancel-no-refund { color: #b3261e; }
.cancel-scheduled { color: #b3261e; font-weight: 700; }
.billing-leave { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.billing-leave-label { color: #b3261e; font-weight: 700; font-size: .92rem; }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: .88rem; }
/* アカウント（2026-11-11） */
.account-email { font-size: 1.15rem; font-weight: bold; word-break: break-all; margin: 0 0 6px; }

/* 長い URL が狭い画面で横にはみ出さないようにする（プライバシーポリシーの外部リンク・2026-11-12） */
main a, main li, main p, main dd { overflow-wrap: anywhere; }
