@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg: #14140f;
  --surface: #1c1c16;
  --surface-2: #24241c;
  --line: #35352a;
  --gold: #b8934f;
  --gold-soft: #d9bd8a;
  --green: #445c46;
  --text: #f2ede2;
  --text-muted: #9c9686;
  --danger: #b5654a;
  --radius: 2px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}
.brand .logo-img {
  max-width: 280px;
  width: 100%;
  height: auto;
}
.brand .mark {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--gold-soft);
  text-transform: uppercase;
}
.brand h1 {
  font-size: 22px;
  margin-top: 8px;
  color: var(--text);
}
.brand .sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}
.brand .equip-badge {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: inline-block;
}
.brand .equip-badge .equip-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.brand .equip-badge img {
  width: 84px;
  height: auto;
  opacity: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 16px;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 6px;
}
label:first-child { margin-top: 0; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], input[type="file"], select {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 18px;
  margin-top: 20px;
  background: var(--gold);
  color: #17170f;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--gold-soft); }
.btn:disabled { background: var(--line); color: var(--text-muted); cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
}
.btn.secondary:hover { background: rgba(184,147,79,0.1); }
.btn.danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.slot {
  padding: 10px 4px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text);
}
.slot:hover { border-color: var(--gold); }
.slot.selected { background: var(--gold); color: #17170f; border-color: var(--gold); font-weight: 700; }
.slot.disabled { color: var(--text-muted); background: var(--surface); cursor: not-allowed; opacity: 0.5; }

.plan-option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.plan-option.selected { border-color: var(--gold); background: rgba(184,147,79,0.08); }
.plan-option .name { font-family: 'Noto Serif JP', serif; font-size: 16px; color: var(--gold-soft); }
.plan-option .price { font-size: 20px; font-weight: 700; margin: 4px 0; }
.plan-option .desc { font-size: 13px; color: var(--text-muted); }

.row { display: flex; justify-content: space-between; align-items: center; }
.small { font-size: 13px; color: var(--text-muted); }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.badge.active { border-color: var(--green); color: #9ad19f; }
.badge.pending { border-color: var(--gold); color: var(--gold-soft); }
.badge.open { border-color: var(--gold); color: var(--gold-soft); }

.msg { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.msg.error { background: rgba(181,101,74,0.15); border: 1px solid var(--danger); color: #e3a48f; }
.msg.success { background: rgba(68,92,70,0.2); border: 1px solid var(--green); color: #b9d9bb; }

hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--text-muted); font-weight: 500; }

.date-tab {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text);
}
.date-tab .dow { font-size: 11px; color: var(--text-muted); }
.date-tab .dom { font-size: 15px; font-weight: 700; margin-top: 2px; }
.date-tab.selected { background: var(--gold); color: #17170f; border-color: var(--gold); }
.date-tab.selected .dow { color: #17170f; }
.date-tab.today:not(.selected) { border-color: var(--gold); }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; }

.tour-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  min-height: 90px;
  background: var(--surface-2);
}
.tour-cell.has-availability {
  border-color: rgba(184,147,79,0.5);
  box-shadow: inset 0 2px 0 var(--gold);
}
.tour-cell .day-num {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tour-slot-line {
  font-size: 11px;
  padding: 2px 4px;
  margin-bottom: 3px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}
.tour-slot-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tour-slot-line.open { background: rgba(184,147,79,0.15); }
.tour-slot-line.booked {
  background: rgba(184,147,79,0.85);
  color: #17170f;
  font-weight: 700;
  border-left: 3px solid var(--gold);
}
.tour-slot-line.session { background: rgba(90,130,168,0.28); }
.tour-slot-line input[type="checkbox"] { margin: 0; }
.tour-slot-line .x-btn {
  margin-left: auto;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
  padding: 0 3px;
}
.tabs button {
  flex: 1; padding: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: 13px;
}
.tabs button.active { background: var(--gold); color: #17170f; border-color: var(--gold); font-weight: 700; }

/* ---- 管理画面: システムの状態(バックアップなど)。public/js/admin-system-status.js が使う。
   管理画面のデザインを変える時は、この部分の見た目だけ直せばよい ---- */
.sys-status { margin-bottom: 16px; }
.sys-status:empty { display: none; }
.sys-status-item {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted);
}
.sys-status-item:last-child { margin-bottom: 0; }
.sys-status-icon { font-weight: 700; flex-shrink: 0; }
.sys-status-detail { display: block; font-size: 12px; margin-top: 2px; }
.sys-status-item.is-ok .sys-status-icon { color: #9ad19f; }
.sys-status-item.is-notice { border-color: var(--gold); background: rgba(184,147,79,0.08); color: var(--gold-soft); }
.sys-status-item.is-warning {
  padding: 12px 14px; border: 2px solid #d9534f; background: rgba(217,83,79,0.2);
  color: #ffb8b2; font-size: 15px; font-weight: 700;
}
.sys-status-item.is-warning .sys-status-detail { font-size: 13px; font-weight: 400; }
.sys-status-item.is-unknown { border-style: dashed; }

/* ---- 管理画面: 鍵(TTLock)の暗証番号の処理で失敗が続いているもの。public/js/admin-lock-tasks.js が使う ---- */
.lock-tasks { margin-bottom: 16px; }
.lock-tasks:empty { display: none; }
.lock-tasks-title { font-size: 13px; font-weight: 700; color: #ffb8b2; margin-bottom: 6px; }
.lock-task { padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--gold); border-radius: var(--radius); font-size: 13px; }
.lock-task.is-urgent { border: 2px solid #d9534f; background: rgba(217,83,79,0.15); }
.lock-task-actions { margin-top: 6px; }
.lock-task-btn { width: auto !important; padding: 4px 10px !important; font-size: 12px !important; margin-right: 6px; }
.lock-state-warn { color: #ffb8b2; font-weight: 700; }

/* ---- 管理画面の予約カレンダー・表(2026/10/19 スマホで画面が右にずれないように。管理画面だけで使う名前) ---- */
/* 7列は画面の幅を7等分し、中の文字(1行・…で切る)では列を広げない */
.admin-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.admin-cal-grid .tour-cell { min-width: 0; overflow: hidden; }
.admin-cal-grid .tour-cell .day-num { flex-wrap: wrap; gap: 2px; }
.admin-cal-grid .cal-count { display: none; }
/* 週は1行を「…」で切らずにセルの中で折り返す(列の幅は広げない。パソコンでも名前が読めるように) */
.admin-cal-grid.week .tour-slot-line { white-space: normal; align-items: flex-start; }
.admin-cal-grid.week .tour-slot-line span { white-space: normal; overflow-wrap: anywhere; }
/* 広い表は、表の中だけ横に動かす(ページ全体はずれない) */
.admin-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  /* 週: 1日1行の縦並び(名前が読めるように) */
  .admin-cal-grid.week { grid-template-columns: minmax(0, 1fr); }
  .admin-cal-grid.week .cal-dow { display: none; }
  .admin-cal-grid.week .tour-cell { min-height: 0 !important; }
  /* 月: 7列のまま、各日は日付と件数だけ */
  .admin-cal-grid.month { gap: 2px; }
  .admin-cal-grid.month .tour-cell { padding: 3px; min-height: 52px !important; }
  .admin-cal-grid.month .tour-slot-line,
  .admin-cal-grid.month .day-num .small { display: none; }
  .admin-cal-grid.month .cal-count { display: block; font-size: 10px; line-height: 1.4; }
  .admin-cal-grid.month .cal-count span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-cal-grid.month .cal-count-booked { color: #8fb8e3; font-weight: 700; }
  .admin-cal-grid.month .cal-count-closed { color: #e3a48f; }
}