/* ============================================================
   RESET & VARS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:     #5BB8D4;
  --blue-lt:  #EBF7FB;
  --blue-dk:  #3A9DBF;
  --orange:   #F4845F;
  --orange-dk:#D9633E;
  --green:    #10B981;
  --white:    #FFFFFF;
  --g50:      #F9FAFB;
  --g100:     #F3F4F6;
  --g200:     #E5E7EB;
  --g400:     #9CA3AF;
  --g600:     #4B5563;
  --g900:     #111827;
  --r:        10px;
  --sh:       0 2px 12px rgba(0,0,0,.08);
  --sh2:      0 6px 28px rgba(0,0,0,.12);
  --font:     'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--g900); background: var(--g50); line-height: 1.6; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--blue-lt);
  position: static;
  box-shadow: var(--sh);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 60px;
}
.logo { font-size: 1.2rem; font-weight: 700; color: var(--blue-dk); }
.logo span { color: var(--orange); }
.header-tel {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .95rem; color: var(--g600);
  text-decoration: none;
}
.header-tel:hover { color: var(--blue-dk); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 260px 1fr;
  gap: 28px; padding: 28px 20px;
  align-items: start;
}
@media (max-width: 820px) {
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 6px 4px; gap: 10px; }
  .sec { padding: 16px 6px; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 80px; }
.info-card {
  background: linear-gradient(145deg, var(--blue-dk), var(--blue));
  color: var(--white); border-radius: 16px; padding: 28px 22px;
  box-shadow: var(--sh2);
}
.info-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.info-tag  { font-size: .78rem; opacity: .8; margin-bottom: 22px; }

.info-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.info-row  { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.info-tel-box {
  background: rgba(255,255,255,.15); border-radius: 10px;
  padding: 14px 16px; text-align: center;
}
.info-tel-label { font-size: .75rem; opacity: .8; }
.info-tel-num   { font-size: 1.3rem; font-weight: 700; margin-top: 2px; }
.info-tel-num a { color: var(--white); text-decoration: none; }
.info-tel-sub   { font-size: .72rem; opacity: .65; margin-top: 2px; }
.info-notice {
  margin-top: 16px;
  padding: 12px 14px;
  background: #FEF3C7;
  border-left: 3px solid #F59E0B;
  border-radius: 8px;
  font-size: .8rem;
  color: #92400E;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .sidebar { position: static; }
  .info-card { border-radius: 12px; padding: 20px 18px; }
  .info-rows { gap: 10px; margin-bottom: 16px; }
}

/* ============================================================
   BOOKING MAIN
   ============================================================ */
.booking-main { display: flex; flex-direction: column; gap: 0; }

/* ---- STEPPER ---- */
.steps {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--sh);
  margin-bottom: 20px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; flex: 1; cursor: default;
}
.step-item + .step-item {
  border-left: 2px solid var(--g200);
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--g200); color: var(--g400);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  transition: .2s;
}
.step-label { font-size: .78rem; color: var(--g400); text-align: center; line-height: 1.3; }

.step-item.active .step-num  { background: var(--orange); color: var(--white); }
.step-item.active .step-label { color: var(--g900); font-weight: 600; }
.step-item.done   .step-num  { background: var(--blue-dk); color: var(--white); }
.step-item.done   .step-label { color: var(--g600); }

/* ---- SECTION ---- */
.sec {
  background: var(--white); border-radius: 14px;
  padding: 28px; box-shadow: var(--sh);
}
.sec-title {
  font-size: 1.1rem; font-weight: 700; color: var(--g900);
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-lt);
}

/* ============================================================
   WEEK NAVIGATION
   ============================================================ */
.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
#week-header, #week-header-bottom { font-size: 1rem; font-weight: 700; color: var(--g900); }
.week-nav .cal-nav-btn {
  width: auto; height: auto; min-height: 44px;
  padding: 6px 18px; font-size: .9rem; font-weight: 600;
  border-color: var(--g300); color: var(--g700);
}

/* ============================================================
   WEEKLY GRID
   ============================================================ */
.week-grid-wrap { overflow-x: hidden; }
.week-grid {
  display: grid;
  grid-template-columns: 42px repeat(7, 1fr);
  width: 100%;
  gap: 1px;
  background: var(--g200);
  border: 1px solid var(--g200);
  border-radius: 10px;
  overflow: hidden;
}
.wg-cell {
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; font-size: .82rem;
}
.wg-corner { background: var(--g50); }
.wg-head {
  background: var(--blue-lt); flex-direction: column;
  padding: 6px 2px; gap: 2px;
}
.wg-head.wg-today { background: var(--blue-dk); color: var(--white) !important; }
.wg-dow { font-size: .72rem; font-weight: 600; }
.wg-date { font-size: .95rem; font-weight: 700; }
.wg-time {
  background: var(--g50); color: var(--g600);
  font-size: .72rem; font-weight: 600;
}
.wg-avail {
  color: var(--orange); font-size: 1.1rem; font-weight: 700;
  cursor: pointer; transition: .12s;
}
.wg-avail:hover { background: var(--orange); color: var(--white); }
.wg-busy { color: var(--g200); font-size: .85rem; }
.wg-wait { color: var(--g400); font-size: .75rem; }
.week-grid-wrap { position: relative; }
.wg-loading {
  position: absolute; inset: 0; background: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; z-index: 10;
}
.wg-spinner {
  width: 32px; height: 32px; border: 3px solid var(--g200);
  border-top-color: var(--blue-dk); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 400px) {
  .week-grid { grid-template-columns: 32px repeat(7, 1fr); }
  .wg-cell { min-height: 34px; }
  .wg-dow { font-size: .65rem; }
  .wg-date { font-size: .85rem; }
  .wg-time { font-size: .65rem; }
  .wg-avail { font-size: .95rem; }
}

/* ============================================================
   CALENDAR
   ============================================================ */
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav-btn {
  background: none; border: 1px solid var(--g200);
  border-radius: 8px; width: 36px; height: 36px;
  cursor: pointer; font-size: 1.1rem; color: var(--g600);
  display: flex; align-items: center; justify-content: center;
  transition: .15s;
}
.cal-nav-btn:hover:not(:disabled) { background: var(--blue-lt); border-color: var(--blue); color: var(--blue-dk); }
.cal-nav-btn:disabled { opacity: .35; cursor: default; }
#cal-header { font-size: 1rem; font-weight: 700; color: var(--g900); }

.cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-dow div {
  text-align: center; font-size: .75rem; font-weight: 600;
  color: var(--g400); padding: 4px 0;
}
.cal-dow div:first-child { color: #EF4444; }
.cal-dow div:last-child  { color: var(--blue-dk); }

#cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cd {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .9rem; font-weight: 500;
  transition: .15s; user-select: none;
}
.cd.on     { cursor: pointer; color: var(--g900); }
.cd.on:hover { background: var(--blue-lt); color: var(--blue-dk); }
.cd.off    { color: var(--g200); cursor: default; }
.cd.today  { font-weight: 700; text-decoration: underline; text-decoration-color: var(--blue); }
.cd.sun    { color: #EF4444; }
.cd.sun.off { color: rgba(239,68,68,.25); }
.cd.sat    { color: var(--blue-dk); }
.cd.sat.off { color: rgba(58,157,191,.25); }
.cd.sel    { background: var(--orange) !important; color: var(--white) !important; font-weight: 700; }

.cal-hint  { font-size: .8rem; color: var(--g400); margin-top: 14px; text-align: center; }

/* ============================================================
   TIME SLOTS
   ============================================================ */
.date-badge {
  display: inline-block; background: var(--blue-lt); color: var(--blue-dk);
  border-radius: 8px; padding: 6px 14px; font-size: .9rem; font-weight: 600;
  margin-bottom: 18px;
}

#time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.ts {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 8px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--g200); background: var(--white);
  transition: .15s; min-height: 64px; gap: 3px;
  font-family: var(--font);
}
.ts:hover:not(.off):not(.sel) { border-color: var(--blue); background: var(--blue-lt); }
.ts.sel   { border-color: var(--orange); background: var(--orange); color: var(--white); }
.ts.off   { background: var(--g50); color: var(--g400); cursor: default; }
.ts-s { font-size: 1rem; font-weight: 700; }
.ts-e { font-size: .75rem; color: var(--g400); }
.ts.sel .ts-e { color: rgba(255,255,255,.8); }
.ts.off .ts-s { text-decoration: line-through; font-size: .9rem; }
.ts-x { font-size: .75rem; color: var(--g400); }

.loading-msg, .no-slots {
  text-align: center; color: var(--g400); padding: 32px 0; font-size: .95rem;
}

/* ============================================================
   FORM
   ============================================================ */
.summary {
  background: var(--blue-lt); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.sum-row { display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.sum-row span { color: var(--g400); min-width: 40px; }
.sum-row strong { color: var(--g900); font-weight: 700; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .88rem; font-weight: 600;
  color: var(--g600); margin-bottom: 6px;
}
.req {
  display: inline-block; background: var(--orange); color: var(--white);
  font-size: .68rem; padding: 1px 6px; border-radius: 4px;
  margin-left: 6px; font-weight: 700; vertical-align: middle;
}
.opt {
  display: inline-block; background: var(--g100); color: var(--g400);
  font-size: .68rem; padding: 1px 6px; border-radius: 4px;
  margin-left: 6px; font-weight: 700; vertical-align: middle;
}
.form-input, .form-textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--g200);
  border-radius: 10px; font-family: var(--font); font-size: .95rem;
  color: var(--g900); transition: .15s; background: var(--white);
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91,184,212,.18);
}
.form-textarea { resize: vertical; min-height: 90px; }

/* ============================================================
   CHECKBOXES
   ============================================================ */
.form-hint {
  font-size: .75rem; color: var(--blue-dk);
  background: var(--blue-lt); padding: 2px 8px;
  border-radius: 4px; font-weight: 500; margin-left: 6px;
  vertical-align: middle;
}
.check-group {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.check-item {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; min-height: 44px; border: 2px solid var(--g200);
  border-radius: 10px; cursor: pointer; transition: .15s;
  font-size: .9rem; color: var(--g900); user-select: none;
}
.check-item:hover { border-color: var(--blue); background: var(--blue-lt); }
.check-item { cursor: pointer; }
.check-item input[type=checkbox] { display: none; }
.check-item:has(input:checked) {
  border-color: var(--blue-dk); background: var(--blue-lt);
  color: var(--blue-dk); font-weight: 600;
}

/* ============================================================
   CONFIRM TABLE
   ============================================================ */
.c-tbl {
  width: 100%; border-collapse: collapse;
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--sh); margin-bottom: 8px;
  table-layout: fixed;
}
.c-tbl th, .c-tbl td {
  padding: 13px 18px; font-size: .92rem; text-align: left;
  word-break: break-all;
}
.c-tbl th {
  background: var(--blue-lt); color: var(--blue-dk);
  font-weight: 700; width: 36%;
}
.c-tbl td { background: var(--white); color: var(--g900); }
.c-tbl tr + tr th,
.c-tbl tr + tr td { border-top: 1px solid var(--g200); }

@media (max-width: 480px) {
  .c-tbl th, .c-tbl td { padding: 11px 12px; font-size: .85rem; }
  .c-tbl th { width: 34%; }
}

.confirm-note {
  font-size: .8rem; color: var(--g400); margin-bottom: 24px; padding: 0 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-submit {
  display: block; width: 100%; padding: 14px;
  background: var(--orange); color: var(--white);
  border: none; border-radius: 10px; font-family: var(--font);
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: .15s;
}
.btn-submit:hover:not(:disabled) { background: var(--orange-dk); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .6; cursor: default; }

.btn-back {
  display: block; width: 100%; padding: 11px;
  background: none; border: 1px solid var(--g200);
  border-radius: 10px; font-family: var(--font);
  font-size: .88rem; color: var(--g600); cursor: pointer;
  margin-top: 10px; transition: .15s;
}
.btn-back:hover { border-color: var(--g400); background: var(--g50); }

/* ============================================================
   COMPLETE SCREEN
   ============================================================ */
.complete-wrap { text-align: center; padding: 12px 0; }
.complete-icon { font-size: 3.5rem; margin-bottom: 12px; }
.complete-title { font-size: 1.4rem; font-weight: 700; color: var(--g900); margin-bottom: 8px; }
.complete-sub   { font-size: .95rem; color: var(--g600); margin-bottom: 28px; line-height: 1.7; }
.complete-info  {
  background: var(--blue-lt); border-radius: 12px;
  padding: 20px; margin-bottom: 28px; text-align: left;
}
.ci-date { font-size: .9rem; color: var(--g600); margin-bottom: 4px; }
.ci-time { font-size: 1.3rem; font-weight: 700; color: var(--blue-dk); margin-bottom: 4px; }
.ci-name { font-size: .95rem; color: var(--g600); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center; padding: 20px;
  font-size: .8rem; color: var(--g400);
  border-top: 1px solid var(--g200);
  margin-top: 20px;
}
