/* ═══════════════════════════════════════════════════
   IMPACT BEAUTY — グローバル変数 & リセット
═══════════════════════════════════════════════════ */
:root {
  --navy:       #1B2A4A;
  --navy-dark:  #0F1D33;
  --navy-mid:   #243557;
  --navy-muted: #546482;
  --navy-soft:  rgba(27, 42, 74, 0.06);
  --white:      #FFFFFF;
  --cream:      #F4F2EF;
  --border:     #DDD9D4;
  --green:      #06C755;
  --ink:        #1A1A1A;
  --muted:      #888;
  --red:        #D94F4F;
  --shadow:     0 2px 12px rgba(0, 0, 0, 0.07);
  --radius:     12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  min-height: 100%;
  background: var(--cream);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ═══════════════════════════════════════════════════
   共通ヘッダー（顧客 & 管理）
═══════════════════════════════════════════════════ */
.top-header {
  background: var(--navy);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  /* 白抜き変換 */
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.header-title {
  color: var(--white);
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════
   顧客ページ
═══════════════════════════════════════════════════ */
.page-wrapper {
  width: min(100%, 430px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
}

.app-shell {
  padding: 14px 14px 40px;
}

.subtitle {
  font-size: 12px;
  color: var(--navy-muted);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ─── カード ─── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.card-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--navy-soft);
  color: var(--navy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

/* ─── 営業時間外パネル ─── */
.status-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.status-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.status-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.status-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── 即時予約カード ─── */
.immediate-card {
  border-color: var(--navy);
  border-width: 1.5px;
  padding: 14px 16px;
}

.immediate-card.is-disabled {
  border-color: var(--border);
  opacity: 0.6;
}

.immediate-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 2px;
}

.immediate-card.is-disabled .immediate-inner {
  cursor: default;
}

.immediate-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.immediate-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 200ms;
}

.immediate-card.is-disabled .immediate-icon-wrap {
  background: #ccc;
}

.immediate-card.is-selected .immediate-icon-wrap {
  background: var(--navy-dark);
}

.immediate-label {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.immediate-card.is-disabled .immediate-label {
  color: var(--muted);
}

.immediate-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.immediate-arrow {
  font-size: 24px;
  color: var(--navy);
  font-weight: 300;
}

.immediate-notes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.immediate-ok-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 5px;
}

.immediate-caution {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── お知らせバー ─── */
.notice-bar {
  background: rgba(27, 42, 74, 0.07);
  border-left: 3px solid var(--navy);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--navy);
  line-height: 1.65;
  margin-bottom: 14px;
}

/* ─── お客様情報入力フォーム ─── */
.input-group { margin-bottom: 12px; }
.input-group:last-child { margin-bottom: 0; }

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 150ms;
}

.input-field:focus { border-color: var(--navy); }

/* ─── スロットグリッド ─── */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.slot-btn {
  position: relative;
  height: 54px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  transition: border-color 150ms, background 150ms, transform 100ms;
  -webkit-tap-highlight-color: transparent;
}

.slot-btn:active { transform: scale(0.97); }

.slot-btn.is-selected {
  border-color: var(--navy);
  border-width: 2px;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 900;
}

.slot-btn.is-selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

/* 即時予約ボタン（グリッド統合） */
.slot-immediate {
  grid-column: 1 / -1;
  height: auto;
  min-height: 58px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: var(--navy);
  border-width: 1.5px;
  text-align: left;
}

.slot-immediate.is-disabled {
  border-color: var(--border);
  opacity: 0.55;
  cursor: not-allowed;
}

.imm-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.slot-immediate.is-disabled .imm-icon { background: #ccc; }
.slot-immediate.is-selected .imm-icon { background: var(--navy-dark); }

.imm-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.imm-label {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
}

.slot-immediate.is-disabled .imm-label { color: var(--muted); }

.imm-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.imm-note {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  padding: 2px 2px 0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px 12px;
  border: 1.5px dashed rgba(27, 42, 74, 0.2);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

/* ─── 予約内容 ─── */
.message-box {
  min-height: 110px;
  border: 1.5px dashed rgba(27, 42, 74, 0.22);
  border-radius: 10px;
  background: rgba(27, 42, 74, 0.02);
  padding: 14px;
  margin-bottom: 12px;
}

.message-placeholder {
  color: #bbb;
  font-size: 13px;
  line-height: 1.7;
}

.message-text {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── ボタン ─── */
.copy-btn {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  transition: opacity 150ms, transform 100ms;
  -webkit-tap-highlight-color: transparent;
}

.copy-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.copy-btn:not(:disabled):active { transform: scale(0.98); }

.line-btn {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 150ms;
  -webkit-tap-highlight-color: transparent;
}

.line-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.line-btn:not(:disabled):active { opacity: 0.88; }

.line-badge-sm {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ─── コピー→LINE フロー ─── */
.flow-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.flow-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.flow-label-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.copy-guide {
  background: #EAF4EA;
  border: 1.5px solid #4CAF50;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.copy-guide-inner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #2E7D32;
}

.copy-guide-inner svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #2E7D32;
}

.copy-guide-inner p {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.copy-guide-inner strong { font-weight: 900; }

.line-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.6;
}

.line-btn.is-pulse {
  animation: pulse-line 0.5s ease;
}

@keyframes pulse-line {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.copy-btn.is-copied {
  background: #2E7D4F;
}

/* ─── その他のご予約 ─── */
.info-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.info-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.info-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.external-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ext-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-weight: 800;
  transition: background 150ms;
  -webkit-tap-highlight-color: transparent;
}

.ext-btn:active { background: #f0eeeb; }

.hpb-btn img {
  max-width: 82%;
  max-height: 28px;
  object-fit: contain;
}

.line-ext-btn { color: #06a947; font-size: 16px; }

.line-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-size: 9px;
  font-weight: 900;
}

.line-label { font-size: 16px; font-weight: 800; }

/* ─── フッター ─── */
.footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── モーダル ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.46);
  display: grid;
  place-items: center;
  padding: 20px 16px;
}

.modal-card {
  width: min(100%, 360px);
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.modal-icon .line-badge-sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--green);
  font-size: 11px;
}

.modal-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 20px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.modal-cancel {
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: white;
  color: var(--navy-muted);
  font-size: 14px;
  font-weight: 700;
}

.modal-confirm {
  height: 48px;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════
   管理ページ
═══════════════════════════════════════════════════ */
.admin-top-header {
  gap: 10px;
}

.admin-header-info {
  display: flex;
  flex-direction: column;
}

.admin-header-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-header-date {
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.admin-preview-link {
  margin-left: auto;
  background: rgba(255,255,255,0.14);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-shell {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 16px 14px 48px;
}

/* ─── 保存バー ─── */
.save-bar {
  background: var(--navy);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.save-bar.is-ok { background: #2E7D4F; }
.save-bar.is-error { background: var(--red); }

/* ─── 管理カード ─── */
.admin-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.admin-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.admin-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.danger-text-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 5px 10px;
  background: none;
  cursor: pointer;
}

/* ─── トグルスイッチ ─── */
.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-toggle-info { flex: 1; }

.admin-toggle-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.admin-toggle-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms;
  display: block;
}

.toggle-thumb {
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: block;
}

.toggle-switch input:checked ~ .toggle-track { background: var(--navy); }
.toggle-switch input:checked ~ .toggle-track .toggle-thumb { transform: translateX(22px); }

/* ─── 管理スロットグリッド ─── */
.admin-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.admin-slot-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  overflow: hidden;
  transition: border-color 150ms;
}

.admin-slot-item.is-checked { border-color: var(--navy); }
.admin-slot-item.is-booked { border-color: #ccc; background: #f7f7f7; }

.admin-slot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.admin-slot-time {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.admin-slot-item.is-booked .admin-slot-time { color: var(--muted); }
.admin-slot-item.is-past .admin-slot-time { color: #bbb; }

.admin-slot-check {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
  flex-shrink: 0;
}

.booked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 8px;
  border-top: 1px solid #eee;
}

.booked-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.release-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
  padding: 0;
}

/* ─── 管理フォームフィールド ─── */
.admin-field { margin-bottom: 12px; }

.admin-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.admin-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 150ms;
}

.admin-input:focus { border-color: var(--navy); }

/* ─── 管理保存ボタン ─── */
.admin-save-btn {
  width: 100%;
  height: 50px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  margin-top: 4px;
  transition: opacity 150ms;
}

.admin-save-btn:active { opacity: 0.85; }
