/* Salonade 顧客PWA。店舗公開ページ（public-shop/render.ts）と同系統の配色 */
:root {
  color-scheme: light;
  --ink: #233f38;
  --accent: #386c5c;
  --accent-soft: #e6efe9;
  --muted: #5b6e67;
  --bg: #f6f8f5;
  --line: #dfe7e0;
  --danger: #a3372b;
  --focus: #bd7621;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px);
}
a { color: var(--accent); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 8px; top: -100px; background: white; padding: 8px 12px; z-index: 30; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: rgba(246, 248, 245, 0.96);
  border-bottom: 1px solid var(--line);
}
.app-shop { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-button {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: white; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.banner { background: #fff4e0; color: #6b4300; padding: 10px 16px; font-size: 14px; }

main { max-width: 560px; margin: 0 auto; padding: 16px; outline: none; }
h1 { font-size: 24px; line-height: 1.4; margin: 12px 0 16px; }
h2 { font-size: 18px; margin: 0 0 10px; }
p { margin: 8px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.shop-title { font-size: 26px; }
.greeting { font-size: 18px; font-weight: 700; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.block { display: block; }
.error { color: var(--danger); }
.loading { color: var(--muted); }
.body, .description { white-space: pre-line; }
.description { display: block; color: var(--muted); font-size: 14px; }

.button {
  display: block; width: 100%; min-height: 48px; margin: 10px 0; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--accent); background: white; color: var(--accent);
  font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer;
}
.button.primary { background: var(--accent); color: white; }
.button.secondary { background: white; }
.button.provider { border-color: #c5d1c9; color: var(--ink); }
.button.line { border-color: #06c755; }
.button.danger { border-color: var(--danger); color: var(--danger); background: white; }
.button.link { border: 0; background: none; color: var(--accent); text-decoration: underline; font-weight: 500; min-height: 44px; }
.button.back { text-align: left; padding-left: 0; }
.button.small { display: inline-block; width: auto; min-height: 44px; padding: 8px 14px; margin: 6px 6px 0 0; font-size: 14px; }
.button:disabled { opacity: 0.55; cursor: progress; }
.stack { display: grid; gap: 0; }
.row { display: flex; gap: 8px; }
.row .button { flex: 1; }
.wrap { flex-wrap: wrap; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.links .button { width: auto; }

.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #eef1ee; color: var(--ink); }
.status-confirmed { background: var(--accent); color: white; }
.status-pending { background: #fff1d6; color: #6b4300; }
.status-cancelled { background: #f4e3e0; color: var(--danger); }

.list { display: grid; gap: 12px; margin-bottom: 12px; }
.reservation { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.card .reservation { border: 0; padding: 0; }
.reservation-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.when { font-weight: 700; }
.service { margin: 6px 0 0; }

.summary { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px 12px; margin: 12px 0 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }

label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px; border: 1px solid #b8c6bd; border-radius: 10px;
  font: inherit; background: white; color: var(--ink);
}
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.check input { width: 24px; min-height: 24px; height: 24px; margin-top: 4px; flex: none; }
.check label { font-weight: 400; margin: 0; }

.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.steps li { flex: 1; text-align: center; padding: 6px 0; border-bottom: 3px solid var(--line); }
.steps li[aria-current="step"] { color: var(--accent); font-weight: 700; border-color: var(--accent); }
.choices { border: 0; padding: 0; margin: 0; }
.choices legend { font-weight: 700; margin-bottom: 8px; }
.choice-group { font-weight: 700; color: var(--muted); font-size: 0.9em; margin: 16px 0 6px; }
.choice-group:first-of-type { margin-top: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 10px; cursor: pointer; }
.choice input { width: 22px; min-height: 22px; height: 22px; margin-top: 3px; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-body { display: grid; }
.section-title { margin-top: 20px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.slot { min-height: 48px; border: 1px solid #b8c6bd; border-radius: 10px; background: white; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }

.notice { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.notice summary { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; cursor: pointer; min-height: 32px; }
.notice.unread { border-color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }

.chat { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: white; border: 1px solid var(--line); }
.bubble p { margin: 0 0 4px; }
.bubble.mine { justify-self: end; background: var(--accent-soft); border-color: #c9dccf; }
.bubble.pending { opacity: 0.85; }
.composer { display: grid; gap: 8px; }
.composer .button { margin: 0; }

.providers, .plain, .menu { list-style: none; padding: 0; margin: 0 0 8px; }
.providers li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu li { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain li { padding: 6px 0; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px);
  max-width: 528px; margin: 0 auto; padding: 12px 16px; border-radius: 12px;
  background: #233f38; color: white; z-index: 20; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.toast:empty { display: none; }
.toast.error { background: var(--danger); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: white; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative; flex: 1; min-height: var(--tabbar); border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 6px 2px;
}
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
.badge { position: absolute; top: 6px; right: calc(50% - 28px); min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: white; font-size: 11px; line-height: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .button, .slot, .tab { transition: background-color 0.15s, color 0.15s; }
}

.header-button { flex-shrink: 0; white-space: nowrap; }
