/* 焼肉セツ子こども食堂 お弁当予約（予約フォーム・店側画面 共通）
   見た目のテーマ：お弁当箱（木の箱・ごはん・卵焼き・焼肉）＋セツ子の赤と黄色
   明るい1テーマに固定（ダークモードなし） */
:root {
  color-scheme: light;
  /* セツ子の色 */
  --red: #C8312B;          /* タレの赤（セツ子の赤） 白文字との比 5.3 */
  --red-dark: #A3241F;     /* 押したとき・リンク */
  --red-soft: #FCE4E1;
  --yellow: #F5C542;       /* 卵焼きの黄（セツ子の黄） 焦げ茶文字との比 9 以上 */
  --yellow-soft: #FFF1C4;
  --yellow-line: #E0A91F;
  /* お弁当の色 */
  --rice: #FFF8EA;         /* ごはんのクリーム色（背景） */
  --card: #FFFDF7;         /* 仕切りの中 */
  --wood: #8A5A35;         /* 弁当箱の木 */
  --wood-light: #D9BF9F;
  --wood-soft: #F3E6D3;
  --green: #2F7A3E;        /* ブロッコリー（受け渡し済み・完了） */
  --green-soft: #E2F2E1;
  /* 文字 */
  --ink: #3A2418;          /* 濃い焦げ茶 */
  --sub: #6B4A33;
  --muted: #8C7A6B;
  --muted-soft: #EFE8DF;
  /* 状態 */
  --ng: #B3261E;
  --ng-soft: #FDE7E5;
  --warn: #7A4E00;
  --warn-soft: #FFF1C4;
  --focus: #1a73e8;
  /* 書体 */
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  /* 旧名（互換） */
  --bg: var(--rice);
  --accent: var(--red);
  --accent-ink: #ffffff;
  --accent-dark: var(--red-dark);
  --line: var(--wood-light);
  --soft: var(--yellow-soft);
  --ok: var(--green);
  --ok-soft: var(--green-soft);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--rice); }
body {
  margin: 0;
  background-color: var(--rice);
  /* お弁当包みのような、うすい黄色のギンガムチェック */
  background-image:
    repeating-linear-gradient(0deg, rgba(245, 197, 66, .13) 0 14px, transparent 14px 28px),
    repeating-linear-gradient(90deg, rgba(245, 197, 66, .13) 0 14px, transparent 14px 28px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}
main { max-width: 560px; margin: 0 auto; padding: 18px 16px 48px; }
/* 画面右下の「Powered by Netlify」バッジがボタンに重ならないよう、ページの最後に余白を取る */
body { padding-bottom: 70px; }
/* 言葉の途中で改行させない（「1個200円」「サンコーポ1階」など） */
.nw { white-space: nowrap; }
h1, h2, h3, .banner .d, .resno .no, .btn, .tel { font-family: var(--font-head); }
h1 { font-size: 1.45rem; margin: 0 0 4px; line-height: 1.4; font-weight: 700; }
h2 { font-size: 1.12rem; margin: 0 0 10px; font-weight: 700; line-height: 1.5; }
h3 { font-size: 1rem; margin: 0 0 6px; font-weight: 700; }
.lead { color: var(--sub); margin: 0 0 20px; text-align: center; }
a { color: var(--red-dark); }

/* ---------- ヘッダー（お弁当箱のイラスト） ---------- */
.hero { text-align: center; margin: 0 0 8px; }
.hero .bento { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 6px; }
.hero h1 { margin: 0 0 10px; }
.hero .h1-shop {
  display: inline-block; background: var(--red); color: #fff; border-radius: 999px;
  padding: 2px 16px; font-size: 1rem; font-weight: 700; letter-spacing: .04em;
}
.hero .h1-title {
  display: block; font-size: 1.9rem; line-height: 1.35; margin-top: 4px;
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
  background-size: 100% 100%; width: fit-content; margin-left: auto; margin-right: auto; padding: 0 6px;
}

/* ---------- 入力欄のまとまり＝弁当箱の仕切り ---------- */
section, .card {
  background: var(--card);
  border: 2px solid var(--wood);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  /* 内側の細い仕切り線 */
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--wood-soft), 0 3px 0 var(--wood-light);
}
section > h2, .card > h2 {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 2px dashed var(--wood-light);
}
/* 見出しの頭に卵焼きの小さな印 */
section > h2::before, .card > h2::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 4px;
  background: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow-line);
}
.mock-bar { background: #333; color: #fff; font-size: .8rem; padding: 6px 12px; text-align: center; }
.mock-bar a { color: #ffd479; margin: 0 4px; }

/* ---------- 受付開始・受付中の案内（のれん風） ---------- */
.banner, .start {
  position: relative; background: var(--yellow); color: var(--ink);
  border-radius: 18px; padding: 18px 16px; text-align: center; margin-bottom: 20px;
  border: 2px solid var(--wood);
  box-shadow: inset 0 0 0 5px var(--yellow), inset 0 0 0 7px rgba(255, 255, 255, .75), 0 3px 0 var(--wood-light);
}
.banner .l, .start .l { font-size: .95rem; font-weight: 500; }
.banner .d, .start .d { font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
.banner.open { background: var(--red); color: #fff; box-shadow: inset 0 0 0 5px var(--red), inset 0 0 0 7px rgba(255, 255, 255, .55), 0 3px 0 var(--wood-light); }
.banner.done { background: var(--muted-soft); color: var(--ink); box-shadow: inset 0 0 0 5px var(--muted-soft), inset 0 0 0 7px rgba(255, 255, 255, .8), 0 3px 0 var(--wood-light); }
.banner .alert { box-shadow: none; }

/* ---------- 表 ---------- */
table.info { width: 100%; border-collapse: collapse; }
table.info th, table.info td { text-align: left; padding: 8px 4px; border-bottom: 1px dashed var(--wood-light); vertical-align: top; font-size: .95rem; }
table.info th { width: 6.5em; color: var(--wood); font-weight: 700; }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: none; }
ul.rules { margin: 0; padding-left: 1.3em; }
ul.rules li { margin: 4px 0; }
ul.rules li::marker { color: var(--red); }
.tel { font-size: 1.35rem; font-weight: 700; margin: 0 0 2px; }
/* 電話・メールのリンクはタップしやすいよう高さ44px以上 */
a[href^="tel:"] { white-space: nowrap; }
.tel a, a[href^="mailto:"] { display: inline-flex; align-items: center; min-height: 44px; }
.tel-hours { margin: 0 0 8px; font-weight: 700; color: var(--sub); }
footer { color: var(--sub); font-size: .82rem; text-align: center; margin-top: 24px; }

/* 受付前ページの開催日一覧 */
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days span { background: var(--yellow-soft); border: 1px solid var(--yellow-line); border-radius: 8px; padding: 2px 10px; font-size: .92rem; font-weight: 700; }

/* ---------- 開催日の一覧 ---------- */
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px dashed var(--wood-light); }
.events li:last-child { border-bottom: none; }
.events .date { font-weight: 700; white-space: nowrap; }
.events .right { text-align: right; font-size: .9rem; }
.events .rem { color: var(--sub); font-size: .85rem; display: block; }
.badge { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .82rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge.open { background: var(--yellow); color: var(--ink); border-color: var(--yellow-line); }
.badge.before { background: var(--yellow-soft); color: var(--warn); border-color: #F0D58A; }
.badge.full, .badge.closed { background: var(--muted-soft); color: var(--sub); }
.badge.cancelled { background: var(--muted-soft); color: var(--muted); }
.more { background: none; border: none; color: var(--red-dark); text-decoration: underline; font-size: .95rem; padding: 8px 0 0; cursor: pointer; min-height: 44px; font-family: inherit; }

/* ---------- フォーム ---------- */
.field { margin: 0 0 20px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 6px; }
.req {
  display: inline-block; background: var(--red); color: #fff; border-radius: 6px;
  font-size: .8125rem; font-weight: 700; line-height: 1.5; padding: 0 6px; margin-left: 6px; vertical-align: 1px;
}
.hint { color: var(--sub); font-size: .88rem; margin: 4px 0 0; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; font-size: 16px; font-family: inherit; color: var(--ink);
  padding: 12px; min-height: 48px; border: 1.5px solid var(--wood-light); border-radius: 12px; background: #fff;
}
input::placeholder, textarea::placeholder { color: #9A8573; }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .choice input:focus-visible + span {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.err { color: var(--ng); font-size: .9rem; font-weight: 700; margin: 6px 0 0; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--ng); background: var(--ng-soft); }

/* ---------- ボタン型の選択肢（選ぶと赤） ---------- */
.choices { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.choices.one { grid-template-columns: 1fr; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 52px;
  padding: 8px; border: 2px solid var(--wood-light); border-radius: 14px; background: #fff; font-weight: 700; cursor: pointer; line-height: 1.35;
  box-shadow: 0 2px 0 var(--wood-light); transition: background-color .12s, border-color .12s;
}
.choice input:checked + span { background: var(--red); border-color: var(--red-dark); color: #fff; box-shadow: 0 2px 0 var(--red-dark); }
.choice input:checked + span small { color: #fff; }
.choice input:disabled + span { background: var(--muted-soft); color: var(--muted); border-color: var(--muted-soft); box-shadow: none; cursor: not-allowed; }
.choice small { display: block; font-weight: 400; font-size: .82rem; }
.age-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.age-row .n { white-space: nowrap; font-weight: 700; min-width: 5.5em; }

.btn {
  display: block; width: 100%; min-height: 56px; border: none; border-radius: 16px; font-size: 1.1rem; font-weight: 700;
  cursor: pointer; background: var(--red); color: #fff; padding: 12px;
  box-shadow: 0 4px 0 var(--red-dark); margin-bottom: 4px;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red-dark); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.sub { background: #fff; color: var(--ink); border: 2px solid var(--wood-light); box-shadow: 0 3px 0 var(--wood-light); }
.btn.sub:hover { background: var(--wood-soft); }
.btn.small { min-height: 44px; font-size: .95rem; width: auto; display: inline-block; padding: 8px 14px; margin-bottom: 0; }
.btn + .btn { margin-top: 12px; }
.total {
  background: var(--yellow-soft); border: 2px dashed var(--yellow-line); border-radius: 14px;
  padding: 12px; font-weight: 700; margin: 0 0 16px;
}
.total .yen { font-size: 1.35rem; color: var(--red-dark); font-family: var(--font-head); }
.alert { border-radius: 12px; padding: 12px; margin: 0 0 16px; font-weight: 700; }
.alert.ng { background: var(--ng-soft); color: var(--ng); border: 1px solid #F3B8B2; }
.alert.ok { background: var(--green-soft); color: var(--green); border: 1px solid #B9DDB7; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #F0D58A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 確認・完了 ---------- */
dl.confirm { margin: 0 0 16px; }
dl.confirm dt { color: var(--wood); font-size: .88rem; font-weight: 700; margin-top: 10px; }
dl.confirm dd { margin: 0; font-weight: 700; font-size: 1.05rem; word-break: break-all; padding-bottom: 6px; border-bottom: 1px dashed var(--wood-light); }
.resno { text-align: center; background: #fff; border: 3px dashed var(--red); border-radius: 18px; padding: 16px; margin: 0 0 16px; }
.resno .l { color: var(--sub); font-weight: 700; }
.resno .no { font-size: 2.4rem; font-weight: 700; letter-spacing: .06em; color: var(--red-dark); line-height: 1.3; }
.shot { background: var(--yellow-soft); color: var(--ink); border: 2px solid var(--yellow-line); border-radius: 14px; padding: 12px; font-weight: 700; text-align: center; margin: 0 0 16px; }

/* ---------- 店側画面（落ち着いた見た目・操作しやすさ優先） ---------- */
.admin-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.admin-head .logo { flex: none; width: 48px; height: 48px; }
.admin-head h1 { font-size: 1.25rem; margin: 0; }
body.admin-page { background-image: none; }
.admin-page section, .admin-page .card { box-shadow: 0 2px 0 var(--wood-light); border-width: 1.5px; }
.admin-top { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.admin-top select { flex: 1; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.stat { background: var(--yellow-soft); border: 1px solid #F0D58A; border-radius: 12px; padding: 10px; text-align: center; }
.stat .k { font-size: .85rem; color: var(--sub); font-weight: 700; }
.stat .v { font-size: 1.6rem; font-weight: 700; line-height: 1.3; font-family: var(--font-head); }
.stat .s { font-size: .82rem; color: var(--sub); }
table.slots { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.slots th, table.slots td { border-bottom: 1px solid var(--wood-soft); padding: 6px 4px; text-align: center; }
table.slots tr:first-child th { background: var(--wood-soft); color: var(--ink); }
table.slots th:first-child, table.slots td:first-child { text-align: left; }
.resv { border: 1.5px solid var(--wood-light); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: #fff; }
.resv.done { background: var(--green-soft); border-color: #B9DDB7; }
.resv.cxl { background: var(--muted-soft); color: var(--muted); }
.resv.cxl .main { text-decoration: line-through; }
.resv .top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; color: var(--sub); }
.resv .name { font-size: 1.1rem; font-weight: 700; }
.resv .cnt { font-weight: 700; }
.resv .memo { background: var(--yellow-soft); color: var(--warn); border-radius: 8px; padding: 6px 8px; margin-top: 6px; font-size: .92rem; white-space: pre-wrap; }
.resv .acts { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.resv .acts .btn { flex: 1; min-height: 48px; font-size: 1rem; margin: 0; }
.resv .acts .btn.picked { background: var(--green); color: #fff; box-shadow: 0 3px 0 #1F5A2B; }
/* 取消は「受け渡し前」と見分けやすいよう、枠なしの控えめな文字ボタンにして間隔をあける */
.resv .acts .btn.cxl-btn {
  flex: none; width: auto; min-width: 64px; min-height: 48px; padding: 8px 10px;
  background: none; border: none; box-shadow: none; color: var(--sub); font-weight: 400; font-size: .95rem; text-decoration: underline;
  font-family: var(--font-body);
}
.resv .acts .btn.cxl-btn:hover { background: var(--muted-soft); }
/* 変更・お断りのボタンと記録（2026-10-21追加） */
.resv .acts.edit { margin-top: 8px; }
.resv .acts .btn.edit-btn { min-height: 44px; font-size: .95rem; }
.resv .acts.edit { gap: 10px; }
/* 変更のあった予約の印（カード左上・一覧の見出し） */
.mod-badge { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: #F5C542; color: #5A3A00; font-weight: 700; font-size: .85rem; vertical-align: middle; white-space: nowrap; }
/* お客様の利用の記録（2026-10-21） */
.visit-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #E3EEF9; color: #1F4E79; font-size: .8rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.visit-badge.first { background: #E6F4EA; color: #1F5A2B; }
.resv .cust-hist { margin-top: 6px; font-size: .85rem; color: var(--sub); }
.resv .cust-hist summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.resv .cust-hist ul { margin: 4px 0 0; padding-left: 18px; }
.staff-row {display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--wood-light); }
.staff-row .btn { width: auto; margin: 0; min-height: 44px; }
.resv .cxl-panel {margin-top: 10px; padding: 10px; border: 1.5px dashed var(--wood-light); border-radius: 12px; background: #fff; }
.resv .cxl-panel .label { font-weight: 700; margin-bottom: 6px; }
.resv .cxl-panel input[type="text"] { width: 100%; }
.resv .noshow-mark { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #FDECEA; color: #A32A22; font-weight: 700; font-size: .92rem; }
.resv .hist {margin: 8px 0 0; padding: 6px 8px; border-left: 3px solid var(--wood-light); font-size: .85rem; color: var(--sub); list-style: none; }
.resv .hist .reply-again { width: auto; min-height: 40px; margin: 6px 0 4px; padding: 6px 14px; font-size: .9rem; }
.resv .hist li {margin: 2px 0; white-space: pre-wrap; }
#replyBox textarea { font-size: .95rem; line-height: 1.6; }
/* 電話番号リンクはタップしやすいよう高さ44px以上 */
.resv .tel-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; font-weight: 700; min-height: 44px; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--red); }
details.card summary { font-weight: 700; cursor: pointer; min-height: 44px; padding: 8px 0; font-family: var(--font-head); }
.muted { color: var(--sub); }
[hidden] { display: none !important; }
