:root {
      --accent: #ff4054;
      --accent-dark: #dd2d40;
      --blue: #0a94ca;
      --line: #ececec;
      --muted: #c7c7c7;
      --text: #333;
      --panel: #f3f3f3;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
      color: var(--text);
      background: #f5f5f5;
    }

    .page {
      width: 100%;
      max-width: 1024px;
      margin: 0 auto;
      min-height: 100vh;
      background: #fff;
      padding: 48px 48px 72px;
    }

    h1 {
      font-size: 22px;
      margin: 0;
    }

    .shop-heading {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 24px;
    }

    .shop-info {
      flex: 0 0 auto;
      text-align: right;
      font-size: 14px;
      line-height: 1.7;
      color: #555;
    }

    .shop-info a {
      color: var(--blue);
      font-weight: 700;
      text-decoration: none;
    }

    .shop-info a:hover { text-decoration: underline; }

    .monthly-section {
      margin-bottom: 28px;
    }

    .monthly-section h2 {
      margin: 0 0 12px;
      font-size: 19px;
    }

    .month-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }

    .month-tab {
      appearance: none;
      border: 1px solid #d8d8d8;
      border-radius: 5px;
      background: #fff;
      color: #444;
      padding: 9px 16px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
    }

    .month-tab.active {
      border-color: var(--accent);
      background: var(--accent);
      color: #fff;
    }

    .month-grid-wrap {
      width: 100%;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
      border: 1px solid var(--line);
      overflow: hidden;
      background: #fff;
    }

    .month-grid {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    .month-grid th {
      height: 30px;
      background: var(--panel);
      font-size: 14px;
    }

    .month-grid td {
      height: 60px;
      padding: 0;
      vertical-align: middle;
      text-align: center;
    }

    .month-grid .outside { background: #fafafa; }

    .month-day-btn {
      width: 100%;
      height: 100%;
      min-height: 60px;
      border: 0;
      background: transparent;
      color: var(--text);
      padding: 3px 2px;
      cursor: pointer;
      font-family: inherit;
      -webkit-appearance: none;
      appearance: none;
    }

    .month-day-btn:hover { background: #fff6f7; }
    .month-day-btn.selected { background: #fff0f2; box-shadow: inset 0 0 0 2px var(--accent); }

    .month-day-num {
      font-weight: 700;
      line-height: 1;
      text-align: center;
      font-size: 18px;
      margin-bottom: 3px;
      color: var(--text);
      -webkit-text-fill-color: var(--text);
    }

    .month-day-num.sat {
      color: #0a94ca;
      -webkit-text-fill-color: #0a94ca;
    }

    .month-day-num.sun,
    .month-day-num.holiday {
      color: var(--accent);
      -webkit-text-fill-color: var(--accent);
    }

    .month-statuses {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

    .month-mini {
      display: inline-flex;
      align-items: center;
      gap: 1px;
      font-size: 11px;
      color: #777;
      line-height: 1;
    }

    .month-mini .status-mark {
      min-width: 20px;
      height: 20px;
      font-size: 16px;
    }

    .month-mini .status-unavailable { font-size: 20px; }
    .month-mini .status-tel { font-size: 9px; }

    .calendar-wrap {
      border: 1px solid var(--line);
      overflow: hidden;
      background: #fff;
    }

    .calendar-head {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 12px;
      background: var(--panel);
      padding: 16px 18px;
    }

    .calendar-head button {
      appearance: none;
      border: 0;
      background: transparent;
      font-size: 16px;
      font-weight: 700;
      color: var(--blue);
      cursor: pointer;
    }

    .calendar-head button:disabled {
      color: #c9c9c9;
      cursor: not-allowed;
    }

    .calendar-head .prev { justify-self: start; }
    .calendar-head .next { justify-self: end; }
    .month-title { font-size: 20px; font-weight: 700; }

    .calendar-scroll { overflow: hidden; width: 100%; }
    table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    th, td {
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      text-align: center;
      height: 66px;
    }

    th:last-child, td:last-child { border-right: 0; }
    thead th {
      height: 64px;
      font-weight: 500;
      background: #fff;
    }

    .time-col {
      width: 12%;
      font-size: clamp(11px, 1.8vw, 18px);
      font-weight: 700;
      background: #fff;
      white-space: nowrap;
    }

    .date-head .day { font-size: 14px; line-height: 1.1; }
    .date-head .dow { margin-top: 4px; font-size: 14px; }
    .sat { color: #0a94ca; }
    .sun, .holiday { color: var(--accent); }

    .slot {
      min-width: 46px;
      height: 42px;
      padding: 0 5px;
      border: 0;
      background: transparent;
      cursor: pointer;
      display: inline-grid;
      place-items: center;
      font-family: inherit;
    }

    .status-mark {
      display: inline-grid;
      place-items: center;
      min-width: 30px;
      height: 30px;
      line-height: 1;
      font-size: 25px;
      font-weight: 700;
      transition: .15s ease;
      user-select: none;
    }

    .status-excellent { color: #e83b50; }
    .status-available { color: #e83b50; }
    .status-few { color: #e89419; }
    .status-unavailable { color: var(--muted); font-size: 30px; font-weight: 400; }
    .status-tel { color: var(--blue); font-size: 13px; letter-spacing: .2px; }

    .slot:hover .status-mark {
      transform: scale(1.12);
    }

    .legend {
      display: flex;
      gap: 22px;
      align-items: center;
      margin-top: 14px;
      font-size: 14px;
      color: #666;
    }
    .legend-item { display: flex; align-items: center; gap: 8px; }
    .legend .status-mark { min-width: 22px; height: 22px; font-size: 19px; }
    .legend .status-unavailable { font-size: 23px; }
    .legend .status-tel { font-size: 12px; }


    .other-reservation-notice {
      margin-top: 28px;
      padding: 18px 20px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fafafa;
      text-align: center;
    }

    .other-reservation-notice p {
      margin: 0;
      line-height: 1.7;
    }

    .other-reservation-notice .notice-title {
      font-weight: 700;
      font-size: 16px;
      color: #333;
    }

    .other-reservation-notice .notice-detail {
      margin-top: 4px;
      font-size: 14px;
      color: #666;
    }

    .map-section {
      margin-top: 34px;
      padding-top: 28px;
      border-top: 1px solid var(--line);
    }

    .map-section h2 {
      margin: 0 0 10px;
      font-size: 20px;
    }

    .shop-address {
      margin: 0 0 14px;
      color: #555;
      line-height: 1.7;
    }

    .map-frame {
      width: 100%;
      height: 380px;
      border: 0;
      border-radius: 6px;
      display: block;
      background: #f2f2f2;
    }

    .map-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
    }

    .map-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 10px 16px;
      border: 1px solid #d7d7d7;
      border-radius: 5px;
      background: #fff;
      color: #333;
      font-weight: 700;
      text-decoration: none;
    }

    .map-link:hover {
      background: #f7f7f7;
      border-color: #bbb;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(0, 0, 0, .45);
      z-index: 1000;
    }
    .modal-backdrop.open { display: flex; }

    .modal {
      width: min(620px, 100%);
      max-height: 90vh;
      overflow-y: auto;
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 20px 60px rgba(0,0,0,.25);
      padding: 28px;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 8px;
    }

    .modal-title {
      margin: 0;
      font-size: 22px;
    }

    .modal-close {
      appearance: none;
      border: 0;
      background: transparent;
      color: #666;
      padding: 6px 2px 6px 10px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      font-family: inherit;
    }

    .modal-close:hover { color: var(--accent); }

    .field-help {
      margin: 6px 2px 0;
      color: #777;
      font-size: 12px;
      line-height: 1.5;
    }

    .selected-datetime {
      padding: 12px 14px;
      margin-bottom: 22px;
      background: #f7f7f7;
      border-left: 4px solid var(--accent);
      font-weight: 700;
    }

    .field { margin-bottom: 16px; }
    .field label {
      display: block;
      margin-bottom: 7px;
      font-weight: 700;
    }
    .required {
      display: inline-block;
      margin-left: 8px;
      color: #fff;
      background: var(--accent);
      font-size: 11px;
      padding: 2px 6px;
      border-radius: 3px;
      vertical-align: 1px;
    }

    input, select {
      width: 100%;
      padding: 12px 13px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 16px;
      outline: none;
      background: #fff;
      font-family: inherit;
    }
    input:focus, select:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(10,148,202,.08);
    }

    .conditional-field {
      display: none;
      margin: 4px 0 16px 30px;
      padding: 14px;
      border-left: 3px solid var(--blue);
      background: #f5fbfd;
      border-radius: 0 5px 5px 0;
    }
    .conditional-field.show { display: block; }
    .conditional-field label {
      display: block;
      margin-bottom: 7px;
      font-weight: 700;
    }

    .confirmations {
      margin-top: 22px;
      padding: 16px;
      border: 1px solid #e2e2e2;
      border-radius: 6px;
      background: #fafafa;
    }

    .check-row {
      display: flex !important;
      align-items: flex-start;
      gap: 10px;
      margin: 0 0 14px !important;
      font-weight: 600 !important;
      line-height: 1.6;
      cursor: pointer;
    }

    .check-row:last-of-type { margin-bottom: 0 !important; }

    .check-row input[type="checkbox"] {
      width: 20px;
      height: 20px;
      flex: 0 0 20px;
      margin: 2px 0 0;
      accent-color: var(--accent);
      cursor: pointer;
    }

    .tax-payment-options {
      display: none;
      margin: 4px 0 16px 30px;
      padding: 14px;
      border-left: 3px solid var(--blue);
      background: #f5fbfd;
      border-radius: 0 5px 5px 0;
    }
    .tax-payment-options.show { display: block; }
    .tax-payment-title {
      margin: 0 0 10px;
      font-size: 13px;
      font-weight: 700;
    }
    .radio-row {
      display: flex !important;
      align-items: flex-start;
      gap: 9px;
      margin: 0 0 10px !important;
      font-weight: 500 !important;
      cursor: pointer;
    }
    .radio-row input[type="radio"] {
      width: 18px;
      height: 18px;
      margin: 1px 0 0;
      flex: 0 0 auto;
      accent-color: var(--accent);
    }


    .confirmation-note {
      margin: 12px 0 0;
      color: #666;
      font-size: 13px;
    }

    .form-actions {
      display: flex;
      gap: 12px;
      justify-content: flex-end;
      margin-top: 24px;
    }

    .btn {
      border: 0;
      border-radius: 5px;
      padding: 12px 20px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
    }
    .btn-secondary { background: #ececec; color: #444; }
    .btn-primary { background: var(--accent); color: #fff; transition: .15s ease; }
    .btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
    .btn-primary:disabled {
      background: #d7d7d7;
      color: #999;
      cursor: not-allowed;
      box-shadow: none;
      opacity: .75;
    }

    .confirm-screen, .complete-screen { display: none; }
    .confirm-screen.show, .complete-screen.show { display: block; }

    .confirm-list {
      margin: 20px 0 0;
      border-top: 1px solid var(--line);
    }
    .confirm-row {
      display: grid;
      grid-template-columns: 150px 1fr;
      gap: 18px;
      padding: 14px 4px;
      border-bottom: 1px solid var(--line);
      line-height: 1.6;
    }
    .confirm-label { font-weight: 700; color: #555; }
    .confirm-value { word-break: break-word; }
    .confirm-checks {
      margin-top: 18px;
      padding: 14px 16px;
      background: #fafafa;
      border: 1px solid #e2e2e2;
      border-radius: 6px;
      line-height: 1.8;
    }
    .complete-icon {
      width: 64px;
      height: 64px;
      margin: 8px auto 18px;
      border-radius: 50%;
      background: #effaf0;
      color: #2f7a3b;
      display: grid;
      place-items: center;
      font-size: 34px;
      font-weight: 700;
    }
    .complete-screen { text-align: center; }
    .complete-screen p { line-height: 1.8; }

    .success {
      display: none;
      margin-top: 20px;
      padding: 16px;
      border: 1px solid #bfe2c3;
      background: #effaf0;
      color: #2f6d39;
      border-radius: 5px;
    }
    .success.show { display: block; }

    @media (max-width: 720px) {
      .page { padding: 28px 14px 48px; }
      h1 { font-size: 20px; }
      .shop-heading { flex-direction: column; gap: 8px; }
      .shop-info { text-align: left; }
      .map-frame { height: 300px; }
      .calendar-head { padding: 11px 8px; }
      .calendar-head button { font-size: 12px; }
      .month-title { font-size: 15px; }
      th, td { height: 54px; }
      thead th { height: 52px; }
      .status-mark { min-width: 22px; height: 24px; font-size: 20px; }
      .status-unavailable { font-size: 24px; }
      .status-tel { font-size: 10px; }
      .slot { min-width: 0; width: 100%; padding: 0; }
      .month-tab { padding: 7px 10px; font-size: 12px; }
      .month-grid th { height: 26px; font-size: 14px; }
      .month-grid td, .month-day-btn { height: 56px; min-height: 56px; }
      .month-day-num { font-size: 16px; }
      .month-statuses { gap: 2px; }
      .month-mini { font-size: 9px; }
      .month-mini .status-mark { min-width: 15px; height: 15px; font-size: 13px; }
      .month-mini .status-unavailable { font-size: 17px; }
      .month-mini .status-tel { font-size: 7px; }
      .modal { padding: 22px 18px; }
      .confirm-row { grid-template-columns: 1fr; gap: 4px; }
    }

/* Laravel integration: keep the attachment's design rules above unchanged. */
[hidden] { display: none !important; }
.js-only { display: none; }
.js .js-only { display: block; }
.reservation-panel { margin: 28px auto; max-height: none; }
.reservation-dialog { border: 0; padding: 0; background: transparent; width: min(620px, calc(100% - 40px)); max-height: 90vh; }
.reservation-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.reservation-dialog .modal { width: 100%; margin: 0; max-height: none; }
.error, .error-summary { color: #b91c1c; }
.error-summary { border: 1px solid #b91c1c; padding: 12px; margin-bottom: 16px; }
.legend { flex-wrap: wrap; }
.expiry-inputs { display: flex; align-items: center; gap: 8px; }
.expiry-inputs select { flex: 1; min-width: 0; }
.month-day-btn:disabled { opacity: .45; cursor: default; }
.month-grid td { height: auto; vertical-align: top; }
.month-day-btn { height: auto; }
.month-statuses { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
.month-mini { max-width: 100%; flex-wrap: wrap; justify-content: center; white-space: nowrap; line-height: 1.3; row-gap: 2px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
