/* TOTAL LIFEGUARD ショップ */
:root {
  --blue: #2f76b7; --blue-dark: #245f8f; --ink: #1f2d3d; --muted: #5d6b7a; --line: #d9e3ef;
  --bg: #f5f8fb; --card: #fff; --red: #c0392b; --green: #1e7e4a; --warn-bg: #fff4e5;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.75; }
a { color: var(--blue); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.top { background: #fff; border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
header.top.admin { background: var(--ink); } header.top.admin a { color: #fff; }
.brand { font-weight: 800; text-decoration: none; color: var(--ink); letter-spacing: .02em; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
header nav a { text-decoration: none; font-weight: 700; }
.badge { display: inline-block; min-width: 1.5em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; text-align: center; }
main.wrap { padding-top: 20px; padding-bottom: 48px; }
h1 { font-size: 24px; line-height: 1.4; margin: 8px 0 16px; }
h2 { font-size: 19px; margin: 28px 0 10px; } h3 { font-size: 16px; margin: 16px 0 6px; }
.flash { padding: 12px 14px; border-radius: 8px; background: #e8f4ea; color: var(--green); border: 1px solid #b7dcc1; }
.flash.error { background: #fdecea; color: var(--red); border-color: #f3c2bc; }
.note { color: var(--muted); font-size: 14px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.box h2 { margin-top: 0; font-size: 17px; }
.pre { white-space: pre-wrap; }
.btn { display: inline-block; padding: 11px 22px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dark); }
.btn.sub { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.big { padding: 14px 32px; font-size: 18px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { background: var(--red); }
.btn[disabled] { opacity: .6; cursor: wait; }
button.link { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; text-decoration: underline; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.actions-row.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin: 0; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #eef4fa; font-size: 14px; }
.num { text-align: right; white-space: nowrap; }
input.qty, td input.qty { width: 6em; max-width: 6em; }
table.sum { max-width: 420px; margin: 16px 0 16px auto; }
table.sum.wide { max-width: none; margin: 10px 0; }
table.sum th { font-weight: 400; color: var(--muted); }
table.sum td { text-align: right; } table.sum.wide td { text-align: left; }
table.sum tr.total th, table.sum tr.total td { font-size: 18px; font-weight: 800; color: var(--ink); }
table.sum small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table.ship-matrix td { text-align: right; white-space: nowrap; }
table.ship-matrix thead th { white-space: nowrap; }
.list td small { color: var(--muted); }
.form { max-width: 720px; } .form.narrow { max-width: 420px; } .form.wide { max-width: none; }
fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 18px 0; padding: 10px 16px 16px; }
legend { font-weight: 800; padding: 0 6px; }
.field { margin: 12px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }
.field small { display: block; color: var(--muted); font-size: 13px; }
.req { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--red); color: #fff; font-size: 11px; vertical-align: middle; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid #b8c6d6; border-radius: 8px; font: inherit; background: #fff; }
td input[type=text] { padding: 6px 8px; }
input.num { text-align: right; width: 8em; }
textarea { resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); background: #fffafa; }
.err { color: var(--red); font-size: 14px; margin: 4px 0 0; }
.zip-row { display: flex; gap: 10px; align-items: flex-end; } .zip-row .field { flex: 1; max-width: 260px; } .zip-row .btn { margin-bottom: 12px; }
.choice { display: block; margin: 8px 0; cursor: pointer; }
.choice.pay { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.choice.pay label { display: block; cursor: pointer; }
.choice.pay:has(input:checked) { border-color: var(--blue); background: #eef5fc; }
.pay-text { display: block; margin: 2px 0 0 26px; font-size: 14px; color: var(--muted); }
.pay-more { margin: 2px 0 0 26px; font-size: 13px; }
.pay-more summary { margin: 2px 0; font-size: 13px; }
.pay-more p { margin: 6px 0 0; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: 14px; }
.tabs a.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.search { display: flex; gap: 8px; max-width: 520px; margin-bottom: 12px; }
.st { display: inline-block; padding: 0 8px; border-radius: 6px; background: #eef2f7; font-size: 13px; }
.st-new .st, h1 .st-new { background: #fdecea; color: var(--red); }
.st-wait_payment .st, h1 .st-wait_payment { background: var(--warn-bg); color: #9a5b00; }
.st-shipped .st, .st-done .st, h1 .st-shipped, h1 .st-done { background: #e8f4ea; color: var(--green); }
h1 .st { font-size: 14px; vertical-align: middle; padding: 2px 10px; border-radius: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; } .inline select, .inline input { width: auto; }
.events { font-size: 14px; color: var(--muted); padding-left: 1.2em; }
.warn { color: #9a5b00; font-size: 13px; }
.checks li.ok { color: var(--green); } .checks li.ng { color: var(--red); font-weight: 700; }
.big-no { font-size: 20px; }
pre.summary { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-family: inherit; }
ol.steps li { margin: 4px 0; }
details summary { cursor: pointer; color: var(--blue); margin: 10px 0; }
footer.foot { border-top: 1px solid var(--line); background: #fff; font-size: 14px; }
footer.foot .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.foot p { width: 100%; margin: 4px 0 0; color: var(--muted); }
/* 管理画面：講習・機材レンタルの予定 */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.cal-head h2 { margin: 0; font-size: 20px; }
.cal-legend .chip { display: inline-block; margin: 0 6px 4px 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--card); }
.cal .dow { padding: 4px; text-align: center; font-size: 13px; background: #eef4fa; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 92px; padding: 3px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.4; }
.cal .day.out { background: #f6f7f9; }
.cal .day.out .dnum { color: #9aa5b1; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal .dnum { font-weight: 700; font-size: 13px; }
.cal .dnum .wd { display: none; }
.cal .sun .dnum, .cal .dow.sun { color: var(--red); }
.cal .sat .dnum, .cal .dow.sat { color: var(--blue); }
body.area-admin main.wrap:has(.cal) { max-width: 1280px; }
.chip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 2px 0; padding: 1px 4px; border-radius: 4px; border: 1px solid; font-size: 12px; line-height: 1.4; color: var(--ink); text-decoration: none; overflow: hidden; word-break: break-all; }
.cal-legend .chip { -webkit-line-clamp: 1; }
.chip.course { background: #dcecff; border-color: #9cc3f0; }
.chip.rental { background: #ffe9d6; border-color: #efb88a; }
.chip.tent { background: #fff; border-style: dashed; color: var(--muted); }
.chip.lack { border-color: var(--red); }
.chip.lack::before { content: "⚠ "; color: var(--red); }
.chip.done { opacity: .6; }
.avail { margin-top: 2px; font-size: 11px; color: var(--muted); }
.avail .short { color: var(--red); font-weight: 700; }
.agenda-day { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.agenda-date { font-weight: 700; }
.agenda .chip { -webkit-line-clamp: unset; font-size: 14px; }
.crumbs { font-size: 14px; margin: 0; }
.when { font-size: 18px; font-weight: 700; margin: 4px 0; }
.plan { margin: 6px 0; padding-left: 1.2em; }
.cand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cand:first-of-type { border-top: 0; }
.err-inline { color: var(--red); font-size: 14px; } .ok-inline { color: var(--green); font-size: 14px; }
.yoyaku-form .label { display: block; font-weight: 700; margin-bottom: 4px; }
.equip-row, .date-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
.equip-row label, .date-row label { display: flex; flex-direction: column; font-weight: 400; font-size: 14px; }
.equip-row input { width: 6em; }
.date-row { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.date-row > strong { width: 100%; font-size: 14px; }
.yoyaku-form:has(input[name="kind"][value="rental"]:checked) .course-only { display: none; }
.yoyaku-form:has(input[name="kind"][value="course"]:checked) .rental-only { display: none; }
.history { margin: 0; padding-left: 1.2em; font-size: 14px; }
@media (max-width: 640px) {
  .cal { display: block; border: 0; background: none; }
  .cal .dow, .cal .day.empty, .cal .day.nochip, .cal .day.out { display: none; }
  .cal .day { min-height: 0; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 14px; }
  .cal .dnum .n { display: none; } .cal .dnum .wd { display: inline; }
  .chip { -webkit-line-clamp: unset; font-size: 14px; }
  .agenda-day { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  h1 { font-size: 21px; }
  .grid2 { grid-template-columns: 1fr; }
  table.cart thead { display: none; }
  table.cart, table.cart tbody, table.cart tfoot, table.cart tr, table.cart td { display: block; width: 100%; }
  table.cart tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.cart td { border: 0; padding: 4px 10px; text-align: left; }
  table.cart td[data-label]::before { content: attr(data-label) "："; color: var(--muted); font-size: 13px; }
  table.cart tfoot tr { display: flex; align-items: center; justify-content: space-between; padding: 10px; }
  table.cart tfoot th, table.cart tfoot td { display: block; width: auto; border: 0; padding: 0; }
  table.cart tfoot td:empty { display: none; }
  .btn.big { width: 100%; text-align: center; }
  .list { font-size: 14px; } .list th, .list td { padding: 8px 6px; }
  table.ship-matrix { font-size: 14px; } table.ship-matrix th, table.ship-matrix td { padding: 8px 5px; }
  table.ship-matrix thead th { white-space: normal; } table.ship-matrix small { font-size: 11px; }
}
