/* panper 有料Web版 公開ページ共通。配色は試し運用版 index.html と同じ。年配の方向けに文字・ボタンは大きめ。 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; } /* メニューを開いても中身が横にずれないように（不具合60） */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  color: #3a2e25;
  background: #faf6f0;
  line-height: 1.7;
}
.page { max-width: 640px; margin: 0 auto; padding: 16px; }
.site-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; }
.site-head img { width: 44px; height: 44px; border-radius: 10px; }
.site-head a { color: inherit; text-decoration: none; font-size: 1.5rem; font-weight: bold; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; line-height: 1.4; }
h2 { font-size: 1.25rem; margin: 24px 0 8px; line-height: 1.4; }
p { margin: 0 0 12px; }
a { color: #8a5a2b; }
.card { background: #fff; border: 1px solid #e5d6c3; border-radius: 10px; padding: 16px; margin-bottom: 16px; }

/* 入力欄 */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: bold; margin-bottom: 6px; }
.field .hint { display: block; font-size: 0.9rem; color: #6a5545; font-weight: normal; }
input[type="email"], input[type="password"], input[type="text"] {
  display: block; width: 100%; min-height: 56px; font-size: 20px; font-family: inherit; color: inherit;
  padding: 10px 12px; border: 2px solid #c9b49c; border-radius: 8px; background: #fff;
}
input:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 2px; border-color: #8a5a2b; }

/* ボタン（大きく。スマホでは横いっぱい） */
.btn, button.btn {
  display: block; width: 100%; min-height: 60px; margin: 12px 0; padding: 12px 16px;
  font-size: 1.2rem; font-weight: bold; font-family: inherit; text-align: center; text-decoration: none; line-height: 1.4;
  border: 2px solid #8a5a2b; border-radius: 10px; background: #8a5a2b; color: #fff; cursor: pointer;
}
.btn.sub { background: #fff; color: #5a3a1c; border-color: #c98b4a; }
.btn.danger-outline { background: #fff; color: #b0361f; border-color: #b0361f; }
.btn:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 3px; }
.btn[disabled], .btn[aria-disabled="true"] { background: #d9cfc4; border-color: #d9cfc4; color: #6a5a4c; cursor: not-allowed; }
@media (min-width: 600px) { .btn { font-size: 1.25rem; } }

/* お知らせ */
.msg { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-weight: bold; }
.msg[hidden] { display: none; }
.msg.info { background: #fff4e6; border: 2px solid #c98b4a; }
.msg.error { background: #fdecea; border: 2px solid #b0361f; color: #8a2614; }
.msg.ok { background: #eef6e8; border: 2px solid #5a8a3a; color: #2f5418; }
.test-banner { background: #3a2e25; color: #fff; text-align: center; font-size: 0.95rem; padding: 6px 8px; }
.test-banner[hidden] { display: none; }

/* 規約の本文 */
.doc { border: 2px solid #e5d6c3; border-radius: 10px; background: #fff; margin-bottom: 16px; }
.doc-head { padding: 12px 14px; border-bottom: 1px solid #e5d6c3; background: #fff4e6; border-radius: 10px 10px 0 0; }
.doc-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.doc-meta { font-size: 0.95rem; color: #5a4535; margin: 0; }
.doc-body { padding: 12px 14px; max-height: 50vh; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; }
.doc-body:focus-visible { outline: 3px solid #2a6fdb; }

/* 料金の表示 */
.price { font-size: 1.6rem; font-weight: bold; color: #5a3a1c; }

/* 同意のチェック（大きく押しやすく） */
.agree-box { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 3px solid #c98b4a; border-radius: 10px; background: #fff; cursor: pointer; font-weight: bold; font-size: 1.1rem; }
.agree-box input { width: 32px; height: 32px; margin: 2px 0 0; flex: none; accent-color: #8a5a2b; }

/* 表 */
table.info { width: 100%; border-collapse: collapse; background: #fff; }
table.info th, table.info td { border: 1px solid #e5d6c3; padding: 10px; text-align: left; vertical-align: top; }
table.info th { background: #fff4e6; width: 38%; }
@media (max-width: 480px) {
  table.info th, table.info td { display: block; width: 100%; }
  table.info th { border-bottom: none; }
}

.links { margin-top: 24px; font-size: 1rem; }
.links a { display: inline-block; padding: 8px 0; margin-right: 16px; }
.site-foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid #e5d6c3; font-size: 0.95rem; }
.site-foot a { display: inline-block; padding: 6px 0; margin-right: 16px; }
.legal-flag { font-size: 0.9rem; color: #8a2614; font-weight: bold; }
[hidden] { display: none !important; }
@media (max-width: 400px) {
  body { font-size: 17px; }
  .page { padding: 12px; }
}
.hint { font-size: 0.95rem; color: #6a5545; }
.card > h2:first-child { margin-top: 0; }
/* 「確認中の案」の注意（規約・同意・特商法の画面の上に出す） */
.msg.review { background: #fff8db; border: 3px solid #b8860b; color: #4a3500; font-weight: normal; }
.msg.review strong { font-weight: bold; }

/* ===== 上の帯と ☰ メニュー（アカウント画面。本体 index.html と同じ形。2026-11-05） ===== */
html { scroll-padding-top: 80px; } /* 上の帯の下に入力欄がもぐらないように（実際の帯の高さに合わせて JS で直す） */
/* ===== 上の帯（スクロールしても残る）と ☰ メニュー（2026-11-05 タブから変更） ===== */
.topbar { position: sticky; top: 0; z-index: 10; background: #faf6f0; border-bottom: 2px solid #c98b4a; }
.topbar.unstuck { position: relative; } /* 帯が高くなりすぎたとき（大きい文字など）は残さず、ふつうに流す（不具合56） */
.topbar-in, .menu-head {
  max-width: 640px; margin: 0 auto; padding: 6px 16px; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tb-names { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.menu-head > .tb-text { flex: 1 1 auto; }
.tb-text { min-width: 0; }
.tb-icon { flex: none; width: 32px; height: 32px; border-radius: 6px; }
.tb-app a { color: inherit; text-decoration: none; }
.tb-app { display: block; margin: 0; font-size: 0.85rem; font-weight: normal; color: #6a5545; line-height: 1.3; }
.tb-page {
  display: block; margin: 0; font-size: 1.4rem; font-weight: bold; color: #3a2e25; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-page:focus { outline: none; }
.tb-page:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 2px; }
/* 「☰ メニュー」と「✕ 閉じる」は同じ幅（✕ が ☰ と同じ場所に出るように） */
.menu-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: max(120px, calc(5.4em + 36px)); min-height: 52px; padding: 6px 12px; font-family: inherit; font-size: 1.1rem; font-weight: bold;
  border: 2px solid #c98b4a; border-radius: 8px; background: #fff; color: #5a3a1c; cursor: pointer; line-height: 1.3;
}
.menu-btn:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 2px; }
.menu-btn .ico { font-size: 1.2em; }
/* 狭い幅・大きい文字（文字の大きさに対して幅が足りないとき）：ページ名を ☰ の下の行に回す。
   メニューの上の段も同じ形にするので、「✕ 閉じる」は「☰ メニュー」と同じ場所に出る（不具合56） */
@media (max-width: 19.5em) {
  .topbar-in, .menu-head {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon brand btn" "page page page";
    align-items: center; column-gap: 0; row-gap: 2px;
  }
  .tb-names, .tb-text { display: contents; }
  .tb-icon { grid-area: icon; margin-right: 8px; }
  .tb-app { grid-area: brand; }
  .tb-page { grid-area: page; white-space: normal; }
  .menu-btn { grid-area: btn; }
}
html.menu-open { overflow: hidden; } /* メニューを開いている間は後ろのページをスクロールさせない */
/* メニューは上の段を動かさず、中身だけをスクロールする（スクロールバーが出ても ✕ がずれない。不具合59） */
dialog.menu { padding: 0; margin: 0; border: none; background: #faf6f0; color: inherit; overflow: hidden; }
/* メニューの幅（22em）と中の文字は、本体と同じくブラウザの文字の大きさ（1rem）で決める（この画面の本文は 18px なので、そのままだと本体より広くなる。2026-11-07 PM 判断） */
dialog.menu { font-size: 1rem; }
dialog.menu[open] { display: flex; flex-direction: column; }
dialog.menu .menu-head { flex: none; width: 100%; max-width: none; background: #faf6f0; border-bottom: 2px solid #c98b4a; }
dialog.menu .menu-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
/* スマホ：画面いっぱい */
@media (max-width: 599px) {
  dialog.menu { width: 100%; height: 100%; max-width: none; max-height: none; }
}
/* PC：右上のボタンの真下に重ねる（✕ 閉じる が ☰ メニューと同じ位置に来るよう、帯の高さから始める。ずれは開くときに JS で合わせる） */
@media (min-width: 600px) {
  dialog.menu {
    top: 0; bottom: auto; left: auto; right: max(0px, calc((100% - 640px) / 2));
    width: min(100%, max(360px, 22em)); max-width: 100%; max-height: 100%; border: 2px solid #c98b4a; border-top: none; border-radius: 0 0 10px 10px;
  }
  dialog.menu .menu-head { padding-right: 14px; } /* 右の枠 2px のぶん */
  dialog.menu::backdrop { background: rgba(58, 46, 37, 0.35); }
}
.menu-body { padding: 8px 16px 24px; }
.menu-h { font-size: 0.95rem; font-weight: bold; color: #5a4535; margin: 16px 0 6px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-list .menu-sep { margin-top: 24px; }
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 60px; padding: 8px 12px;
  border: 2px solid #d9c3a8; border-radius: 8px; background: #fff; color: #3a2e25; text-decoration: none;
  font-family: inherit; font-size: 1rem; text-align: left; cursor: pointer; line-height: 1.4;
}
.menu-item .mi-text { flex: 1; min-width: 0; }
.menu-item .mi-name { display: block; font-size: 1.2rem; font-weight: bold; }
.menu-item .mi-desc { display: block; font-size: 0.9rem; color: #6a5545; }
.menu-item .mi-mark { flex: none; color: #8a5a2b; white-space: nowrap; }
.menu-item[aria-current="page"] { border: 4px solid #8a5a2b; border-left-width: 10px; background: #fff4e6; padding: 6px 10px 6px 6px; }
.menu-item[aria-current="page"] .mi-mark { font-weight: bold; color: #5a3a1c; }
.menu-item.menu-logout { justify-content: center; text-align: center; }
.menu-item:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 2px; }
@media (max-width: 400px) {
  .topbar-in, .menu-head, .menu-body { padding-left: 10px; padding-right: 10px; }
}
/* ログアウトの確認（本体と同じ形：安全なほうを上に大きく、2つの間を 32px あける） */
dialog.confirm {
  width: calc(100% - 32px); max-width: 480px; padding: 20px; border: 2px solid #c98b4a; border-radius: 10px;
  background: #fff; color: inherit;
}
dialog.confirm::backdrop { background: rgba(58, 46, 37, 0.45); }
dialog.confirm h2 { font-size: 1.3rem; margin: 0 0 8px; }
dialog.confirm p { margin: 0 0 16px; }
dialog.confirm .btn { margin: 0; }
dialog.confirm form { margin: 32px 0 0; }
/* 規約・特商法の画面の「panper に戻る」（会員だけに出す） */
.site-head a.head-back {
  margin-left: auto; display: inline-flex; align-items: center; min-height: 48px; padding: 6px 14px;
  font-size: 1rem; font-weight: bold; color: #5a3a1c; background: #fff; border: 2px solid #c98b4a; border-radius: 8px; white-space: nowrap;
}
.site-head a.head-back:focus-visible { outline: 3px solid #2a6fdb; outline-offset: 2px; }
