:root {
  --bg: #f1f5f9;
  --surface: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --header-bg: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.35rem;
  background: var(--header-bg);
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}

.app-brand:hover {
  opacity: 0.9;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.app-nav a {
  color: #94a3b8;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.app-nav a:hover,
.app-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.app-org-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.app-main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.app-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.hero-home {
  margin: -0.5rem -1rem 2rem;
  padding: 2.25rem 1.25rem 2.5rem;
  background: linear-gradient(160deg, #e0e7ff 0%, #f8fafc 48%, #fff 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--border);
  border-top: none;
  box-shadow: var(--shadow-md);
}

.hero-home-inner {
  max-width: 40rem;
}

.hero-home h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-home-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.feature-grid {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-card h2 {
  margin: 0.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  min-height: 2.8rem;
}

.feature-card .small {
  font-size: 0.82rem;
  min-height: auto;
}

.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 0.25rem;
}

.feature-card-icon--book {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.feature-card-icon--cal {
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.feature-card-icon--adm {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn.secondary:hover {
  background: #cbd5e1;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.page-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.err {
  color: #b91c1c;
  font-size: 0.9rem;
}

label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

input,
select,
button:not(.btn),
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

ul.slots {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

ul.slots li {
  margin: 0.35rem 0;
}

ul.slots button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
}

ul.slots button:hover {
  border-color: var(--primary);
}

.admin-panel label {
  margin-top: 1rem;
}

.admin-actions {
  margin-top: 1rem;
}

.admin-json {
  margin-top: 1rem;
  padding: 1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  overflow: auto;
  font-size: 0.8rem;
  max-height: 60vh;
}

code {
  font-size: 0.85em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* スマホ: 時間枠ボタンを押しやすく */
@media (max-width: 640px) {
  ul.slots button,
  .slot-btn {
    min-height: 44px;
    padding: 0.65rem 0.75rem;
  }
  .btn {
    min-height: 44px;
  }
}

.app-main.wide {
  max-width: 1180px;
}

.page-lead {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 52rem;
}

.cal-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.cal-banner.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.cal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.cal-h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.cal-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.cal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.cal-field {
  flex: 1;
  min-width: 200px;
}

.cal-field input {
  width: 100%;
  margin-top: 0.35rem;
}

.cal-actions {
  flex: 0 0 auto;
}

.cal-week-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cal-week-label {
  margin-left: auto;
  font-weight: 600;
  color: var(--text);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.cal-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cal-leg-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.cal-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}

.cal-grid {
  min-width: 720px;
}

.cal-head {
  display: grid;
  grid-template-columns: 48px repeat(7, 1fr);
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
}

.cal-corner {
  border-right: 1px solid var(--border);
}

.cal-head-day {
  padding: 0.5rem 0.35rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.cal-head-day:last-child {
  border-right: none;
}

.cal-body {
  display: grid;
  grid-template-columns: 48px repeat(7, 1fr);
  position: relative;
}

.cal-rail {
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.cal-rail-hour {
  font-size: 0.72rem;
  color: var(--muted);
  padding-right: 4px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.cal-col {
  position: relative;
  border-right: 1px solid var(--border);
  background: linear-gradient(to bottom, #fff 0%, #fff 100%);
}

.cal-col:last-child {
  border-right: none;
}

.cal-slot {
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.cal-events-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.cal-event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.cal-event.pending {
  opacity: 0.92;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(255, 255, 255, 0.35) 4px,
    rgba(255, 255, 255, 0.35) 8px
  );
}

.cal-ev-time {
  font-weight: 700;
  font-size: 0.68rem;
  opacity: 0.85;
}

.cal-ev-title {
  font-weight: 600;
}

.cal-ev-meta {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-top: 2px;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cal-table th,
.cal-table td {
  text-align: left;
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid var(--border);
}

.cal-table th {
  color: var(--muted);
  font-size: 0.78rem;
}

.cal-pill {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
}

.cal-pill.ok {
  background: #ecfdf5;
  color: #047857;
}

.cal-staff-auth-help {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.cal-staff-auth-help--err {
  border-color: #fecaca;
  background: #fef2f2;
}

.cal-auth-err {
  color: #b91c1c;
}

.btn.sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
}

.footer-sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.footer-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-hint code {
  font-size: 0.75rem;
}

.admin-msg {
  min-height: 1.25em;
  font-size: 0.9rem;
}

.admin-msg.err {
  color: #b91c1c;
}

.admin-msg.ok {
  color: #047857;
}

.oauth-checklist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.75rem;
}

.oauth-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #dadce0;
  background: #f8f9fa;
  color: #3c4043;
}

.oauth-chip.ok {
  background: #e6f4ea;
  border-color: #34a853;
  color: #137333;
}

.oauth-chip.bad {
  background: #fce8e6;
  border-color: #ea4335;
  color: #c5221f;
}

.oauth-chip.id-preview {
  max-width: 100%;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-style: dashed;
}

.oauth-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0.25rem;
}

.oauth-setup-actions .btn {
  margin-bottom: 0;
}

.oauth-setup-lead {
  margin-top: 0.35rem;
}

/* —— 予約画面 v2: カレンダー＋モーダル —— */
.booking-flow-v2 .booking-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.booking-flow-v2 .booking-hero-bar::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -48px;
  top: -72px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14), transparent 70%);
  pointer-events: none;
}

.booking-hero-title {
  margin: 0.3rem 0 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.booking-top-tools {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  border-radius: 18px;
}

/* [hidden] は display:flex より弱いため、コース行を確実に非表示 */
.booking-top-tools[hidden] {
  display: none !important;
}

.booking-tool-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.booking-service-select {
  min-width: 12rem;
  max-width: 100%;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
}

.booking-page-msg {
  margin: 0.75rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.16);
}

.booking-dialog {
  border: none;
  border-radius: 22px;
  padding: 0;
  max-width: calc(100vw - 2rem);
  width: min(460px, 100%);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.booking-dialog::backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

.booking-dialog__panel {
  position: relative;
  padding: 1.35rem 1.45rem 1.55rem;
  max-height: min(85vh, 720px);
  overflow-y: auto;
}

.booking-dialog__panel.is-submitting::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #1f5f52, transparent);
  animation: bookingShimmer 1.1s linear infinite;
  background-size: 220% 100%;
}

#edit-campaign-dialog {
  width: min(640px, calc(100vw - 2rem));
}

#edit-campaign-dialog .booking-dialog__panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.booking-dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.booking-dialog__datetime {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.booking-dialog__hint {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.82rem;
}

.booking-dialog__input-wide {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.25rem;
  border-radius: 14px;
  border: 1px solid #d8dee8;
  background: #fbfdff;
  min-height: 2.85rem;
}

.booking-dialog__extra {
  margin-bottom: 0.5rem;
}

.booking-dialog__extra .field-label:first-child {
  margin-top: 0.25rem;
}

.booking-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding: 0.75rem 0.25rem 0 0;
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}

.booking-cal-section {
  grid-column: 1 / -1;
  border-radius: 22px;
  padding: 1rem 1rem 1.1rem;
}

.booking-layout-stack {
  grid-template-columns: 1fr !important;
  max-width: 1100px;
  margin: 0 auto;
}

.booking-scheduler-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.15rem 0.15rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.booking-scheduler-head__copy {
  min-width: 0;
}

.booking-scheduler-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.booking-slot-sidebar {
  display: grid;
  gap: 0.7rem;
}

.booking-slot-sidebar__card {
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 251, 255, 0.98), rgba(245, 248, 252, 0.96));
  padding: 0.75rem;
}

.booking-slot-sidebar__notice {
  gap: 0.35rem;
}

.booking-slot-sidebar__title {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.booking-slot-sidebar__lead {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.booking-slot-sidebar__list {
  display: grid;
  gap: 0.6rem;
  max-height: 460px;
  overflow: auto;
  padding-right: 0.15rem;
}

.booking-slot-sidebar__list.is-loading {
  overflow: hidden;
}

.booking-slot-day {
  display: grid;
  gap: 0.45rem;
}

.booking-slot-day__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.booking-slot-day__items {
  display: grid;
  gap: 0.4rem;
}

.booking-slot-list-btn {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(31, 95, 82, 0.16);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
  text-align: left;
}

.booking-slot-list-btn:hover {
  border-color: rgba(31, 95, 82, 0.3);
  background: #f8fcfa;
}

.booking-slot-list-btn.selected {
  border-color: #1f5f52;
  background: #eef8f3;
  box-shadow: 0 0 0 2px rgba(31, 95, 82, 0.12);
}

.booking-slot-list-btn__time {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
}

.booking-slot-list-btn__action {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1f5f52;
}

.booking-calendar-main {
  min-width: 0;
}

.booking-cal-topline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.booking-date-strip-wrap {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  align-items: center;
}

.booking-date-strip {
  display: flex;
  gap: 0.28rem;
  overflow-x: auto;
  padding: 0.05rem 0;
  scrollbar-width: none;
  min-height: 0;
  align-items: stretch;
  flex: 1 1 auto;
}

.booking-date-strip::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.booking-date-pill {
  flex: 0 0 auto;
  min-width: 3.2rem;
  min-height: 0;
  width: auto !important;
  max-width: none;
  padding: 0.24rem 0.42rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  color: #475569;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.035);
  white-space: nowrap;
}

.booking-date-pill--today {
  min-width: 3.3rem;
  color: #1967d2;
  font-weight: 700;
}

.booking-date-pill:hover {
  border-color: rgba(31, 95, 82, 0.28);
  background: #f8fcfa;
}

.booking-date-pill.is-active {
  border-color: rgba(31, 95, 82, 0.42);
  background: rgba(232, 245, 238, 0.98);
  color: #1f5f52;
}

.booking-date-pill.is-today {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.booking-date-pill__date,
.booking-date-pill__dow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}
.booking-date-pill__date {
  font-size: 0.78rem;
  margin-right: 0.14rem;
}

.booking-strip-arrow {
  width: 2.8rem;
  min-width: 2.8rem;
  padding-inline: 0;
}

.booking-cal-range-label-hidden {
  display: none !important;
}

.booking-cal-toolbar {
  margin-bottom: 0.65rem;
  align-items: center;
}

/* 予約画面はページ全体スクロールで最終行まで見えるように（内側だけの短い枠で切れない） */
.booking-cal-wrap {
  max-height: none;
  min-height: 180px;
  overflow: visible;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  padding: 0.35rem;
  position: relative;
}

.booking-grid-head-row {
  position: relative;
  margin-bottom: 0.22rem;
  padding-inline: 0;
  padding-left: var(--booking-rail-width, 40px);
}

.booking-grid-head-row__arrow {
  width: 2.5rem;
  min-width: 2.5rem;
  margin: 0;
  padding-inline: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

#booking-grid-prev {
  left: calc(var(--booking-rail-width, 40px) + 0.4rem);
}

#booking-grid-next {
  right: 0.4rem;
}

.booking-grid-head-row__arrow:hover,
.booking-grid-head-row__arrow:focus-visible,
.booking-grid-head-row__arrow:active,
.booking-grid-head-row__arrow.btn.secondary:hover,
.booking-grid-head-row__arrow.btn.secondary:focus-visible,
.booking-grid-head-row__arrow.btn.secondary:active {
  transform: translateY(-50%) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.booking-grid-date-row {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.booking-grid-date-btn {
  width: auto !important;
  max-width: none;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  padding: 0.26rem 0.18rem;
  text-align: center;
  cursor: default;
}

.booking-grid-date-btn.is-today {
  background: rgba(232, 245, 238, 0.96);
}

.booking-grid-date-btn .gcal-dom-inline,
.booking-grid-date-btn .gcal-dow-inline {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2;
}

.booking-grid-date-btn .gcal-dom-inline {
  margin-right: 0.18rem;
}

.booking-cal-wrap.gcal-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}

.booking-cal-wrap.gcal-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.booking-cal-wrap .gcal-body-week,
.booking-cal-wrap .gcal-body-day {
  padding-bottom: 0.5rem;
}

.booking-cal-wrap .gcal-grid-week {
  min-width: 0;
  width: 100%;
}

.booking-cal-col-compact .gcal-slot {
  min-height: 0;
}

.booking-compact-grid {
  width: 100%;
}

.booking-compact-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.booking-compact-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.booking-compact-time-head,
.booking-compact-time {
  width: 124px;
  min-width: 124px;
  text-align: left;
}

.booking-compact-day-head,
.booking-compact-time,
.booking-compact-cell {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid #e8eaed;
}

.booking-compact-day-head {
  text-align: center;
  font-weight: 700;
  color: #334155;
}

.booking-compact-day-head.is-today {
  background: #eef6ff;
}

.booking-compact-dow {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
}

.booking-compact-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.booking-compact-time {
  background: #fafaf8;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.booking-compact-cell {
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  min-height: 3.4rem;
  height: 3.4rem;
  vertical-align: middle;
}

.booking-compact-empty {
  color: #c0c8d2;
  font-size: 0.82rem;
}

.booking-compact-slot-btn {
  width: auto;
  min-width: 100%;
  margin: 0;
  border: 1px solid rgba(31, 95, 82, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 247, 234, 0.98), rgba(209, 239, 221, 0.96));
  color: #1f5f52;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.65rem;
  box-shadow: 0 4px 10px rgba(31, 95, 82, 0.1);
}

.booking-compact-slot-btn:hover {
  border-color: rgba(31, 95, 82, 0.4);
  background: linear-gradient(180deg, rgba(214, 242, 223, 0.98), rgba(194, 231, 207, 0.96));
}

.booking-compact-slot-btn.selected {
  border-color: #1f5f52;
  background: linear-gradient(180deg, rgba(31, 95, 82, 0.98), rgba(23, 82, 69, 0.96));
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 95, 82, 0.18);
}

.booking-cal-wrap .gcal-head-week {
  grid-template-columns: repeat(7, minmax(72px, 1fr));
}

.booking-cal-wrap .gcal-body-week {
  grid-template-columns: var(--booking-rail-width, 40px) repeat(7, minmax(72px, 1fr));
}

.booking-cal-wrap .gcal-corner,
.booking-cal-wrap .gcal-rail {
  width: var(--booking-rail-width, 40px);
}

.booking-cal-wrap .gcal-head-daycell {
  padding: 0.26rem 0.18rem;
  min-height: 40px;
}

.booking-cal-wrap .gcal-dom,
.booking-cal-wrap .gcal-dow {
  display: inline-block;
  line-height: 1.1;
  vertical-align: middle;
}

.booking-cal-wrap .gcal-dom {
  margin-right: 0.22rem;
  font-size: 0.76rem;
}

.booking-cal-wrap .gcal-dow {
  font-size: 0.7rem;
  color: #475569;
  font-weight: 700;
}

.booking-cal-wrap .gcal-rail-hour {
  font-size: 0.6rem;
  padding-right: 4px;
}

.gcal-rail-closing {
  font-size: 0.72rem;
  color: #137333;
  padding: 6px 6px 8px 0;
  text-align: right;
  border-top: 1px solid #ceead6;
  background: linear-gradient(180deg, rgba(232, 245, 233, 0.95), #fff);
  box-sizing: border-box;
  line-height: 1.25;
  font-weight: 700;
}

/* 「予約可能」ボタンではない。表示用 busy との差分の目安（緑にすると予約可と誤認されるため中立色） */
.booking-cal-footer-spacer {
  border-top: 1px solid #e8eaed;
  box-sizing: border-box;
  flex-shrink: 0;
}

.gcal-col.booking-cal-col-hit .gcal-slot {
  pointer-events: none;
}

.booking-cal-wrap .cal-events-layer.booking-cal-events-layer,
.booking-cal-wrap .gcal-events-layer {
  /* 後段の .gcal-events-layer { pointer-events: none } より優先し、子の緑枠にクリックを届ける */
  pointer-events: auto !important;
}

.booking-cal-col-hit:hover {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.booking-cal-wrap.booking-cal-wrap-day {
  max-height: none;
}

.booking-cal-view-toggle {
  display: inline-flex;
  border: 1px solid #dadce0;
  border-radius: 6px;
  overflow: hidden;
  margin-right: 0.5rem;
}

.booking-cal-view-toggle button {
  border: none;
  background: #fff;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  cursor: pointer;
  color: #3c4043;
}

.booking-cal-view-toggle button.active {
  background: #e8f0fe;
  color: #1967d2;
  font-weight: 600;
}

.booking-busy-block {
  position: absolute;
  left: 1px;
  right: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: repeating-linear-gradient(
    -45deg,
    #f1f3f4,
    #f1f3f4 4px,
    #e8eaed 4px,
    #e8eaed 8px
  );
  border: 1px solid #dadce0;
  border-radius: 4px;
  opacity: 0.92;
  pointer-events: auto;
  /* 予約枠より背面。データのずれで重なった場合は予約可能枠をクリック可能にする */
  z-index: 3;
  box-sizing: border-box;
}

.booking-busy-block .cal-ev-title {
  font-size: 0.62rem;
  line-height: 1.15;
  color: #5f6368;
  padding: 1px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.booking-cal-col-hit {
  cursor: crosshair;
}

.booking-cal-col-hit:active {
  box-shadow: inset 0 0 0 2px rgba(26, 115, 232, 0.45);
}

.gcal-col.booking-day-blocked {
  cursor: not-allowed;
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.94), rgba(226, 232, 240, 0.9)),
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.08) 0,
      rgba(148, 163, 184, 0.08) 10px,
      rgba(255, 255, 255, 0) 10px,
      rgba(255, 255, 255, 0) 20px
    );
}

.gcal-col.booking-day-blocked:active {
  box-shadow: none;
}

.gcal-col.booking-day-blocked .gcal-slot {
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.72), rgba(226, 232, 240, 0.66)),
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.06) 0,
      rgba(148, 163, 184, 0.06) 10px,
      rgba(255, 255, 255, 0) 10px,
      rgba(255, 255, 255, 0) 20px
    );
}

.booking-cal-events-layer .booking-day-blocked-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.78), rgba(241, 245, 249, 0.74)),
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.08) 0,
      rgba(148, 163, 184, 0.08) 10px,
      rgba(255, 255, 255, 0) 10px,
      rgba(255, 255, 255, 0) 20px
    );
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: auto;
  border-radius: 4px;
  padding: 0;
}

.booking-day-blocked-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #475569;
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(148, 163, 184, 0.1);
  line-height: 1;
  white-space: nowrap;
}

.gcal-head-daycell.booking-head-day-blocked {
  color: #64748b;
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(226, 232, 240, 0.92)),
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.08) 0,
      rgba(148, 163, 184, 0.08) 10px,
      rgba(255, 255, 255, 0) 10px,
      rgba(255, 255, 255, 0) 20px
    );
  position: relative;
}

.gcal-head-daycell.booking-head-day-blocked::after {
  content: "予約不可";
  position: absolute;
  left: 50%;
  top: 0.16rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.14rem 0.34rem;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 5px rgba(148, 163, 184, 0.1);
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
}

.gcal-head-daycell.booking-head-day-blocked .gcal-dom {
  margin-top: 0.7rem;
}

.booking-cal-col-grid {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--booking-hour-px) - 1px),
      #e8eaed calc(var(--booking-hour-px) - 1px),
      #e8eaed var(--booking-hour-px)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc((var(--booking-hour-px) / 2) - 1px),
      rgba(232, 234, 237, 0.7) calc((var(--booking-hour-px) / 2) - 1px),
      rgba(232, 234, 237, 0.7) calc(var(--booking-hour-px) / 2),
      transparent calc(var(--booking-hour-px) / 2),
      transparent var(--booking-hour-px)
    ),
    linear-gradient(to bottom, #fff 0%, #fff 100%);
}

.booking-cal-col-grid.is-today {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--booking-hour-px) - 1px),
      #d7e3f4 calc(var(--booking-hour-px) - 1px),
      #d7e3f4 var(--booking-hour-px)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc((var(--booking-hour-px) / 2) - 1px),
      rgba(215, 227, 244, 0.75) calc((var(--booking-hour-px) / 2) - 1px),
      rgba(215, 227, 244, 0.75) calc(var(--booking-hour-px) / 2),
      transparent calc(var(--booking-hour-px) / 2),
      transparent var(--booking-hour-px)
    ),
    linear-gradient(to bottom, rgba(26, 115, 232, 0.04), rgba(26, 115, 232, 0.04));
}

.booking-cal-events-layer .booking-slot-choice.cal-event {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: inherit;
  font-weight: 600;
  border: 1px solid rgba(27, 94, 32, 0.18);
  background: linear-gradient(180deg, rgba(236, 253, 243, 0.98), rgba(217, 246, 224, 0.94));
  color: #0f3b1c;
  border-left: 3px solid #1f7a3d;
  box-shadow: 0 2px 6px rgba(31, 122, 61, 0.1);
  padding: 0.18rem 0.28rem;
  overflow: hidden;
  pointer-events: auto;
  z-index: 8;
  touch-action: manipulation;
  box-sizing: border-box;
  gap: 0.08rem;
  border-radius: 8px;
}

.booking-cal-events-layer .booking-slot-choice .cal-ev-time {
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.booking-cal-events-layer .booking-slot-choice .booking-slot-meta {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.15;
  opacity: 0.82;
  white-space: nowrap;
}

.booking-cal-events-layer .booking-slot-choice .booking-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
}

.booking-cal-events-layer .booking-slot-choice .booking-slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: #166534;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(22, 101, 52, 0.14);
}

@media (max-width: 900px) {
  .booking-scheduler-layout {
    grid-template-columns: 1fr;
  }

  .booking-cal-topline {
    flex-direction: column;
    align-items: stretch;
  }

  .booking-date-strip-wrap {
    width: 100%;
  }

  .booking-slot-sidebar__list {
    max-height: none;
  }

  .booking-scheduler-layout {
    grid-template-columns: 1fr;
  }
}

.booking-cal-events-layer .booking-slot-choice.is-short-slot {
  padding: 0.16rem 0.4rem;
  border-radius: 10px;
  gap: 0.08rem;
}

.booking-cal-events-layer .booking-slot-choice.is-short-slot .cal-ev-time {
  font-size: 0.76rem;
  line-height: 1.1;
}

.booking-cal-events-layer .booking-slot-choice.is-short-slot .booking-slot-meta {
  display: none;
}

.booking-cal-events-layer .booking-slot-choice.is-long-slot {
  padding: 0.35rem 0.45rem;
  gap: 0.2rem;
}

.booking-cal-events-layer .booking-slot-choice.is-long-slot .cal-ev-time {
  font-size: 0.78rem;
}

.booking-cal-events-layer .booking-slot-choice.is-long-slot .booking-slot-meta {
  font-size: 0.68rem;
}

.booking-cal-events-layer .booking-slot-choice:hover {
  background: linear-gradient(180deg, #dff7e8, #c7efd2);
  z-index: 10;
  transform: none;
  box-shadow: 0 4px 12px rgba(31, 122, 61, 0.14);
}

.booking-cal-events-layer .booking-slot-choice.selected {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  color: #fff;
  border-left-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.3);
  z-index: 11;
}

.booking-cal-events-layer .booking-slot-choice.selected .cal-ev-time {
  color: #fff;
}

.booking-cal-events-layer .booking-slot-choice.selected .booking-slot-meta {
  color: rgba(255, 255, 255, 0.92);
}

.booking-cal-events-layer .booking-slot-choice.selected .booking-slot-badge {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(219, 234, 254, 0.32);
}

.booking-selected-hint {
  margin: 0.65rem 0 0;
  font-weight: 600;
  color: var(--text);
}

.booking-flow {
  width: 100%;
}

.public-booking-body {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.1), transparent 22%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.08), transparent 18%),
    linear-gradient(180deg, #f3f7fb, #eef3f8 48%, #f8fafc);
}

.public-booking-main {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.panel-hero {
  margin-bottom: 1.5rem;
}

.org-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1d4ed8;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(29, 78, 216, 0.12);
}

.page-sub {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: #475569;
  max-width: 42rem;
}

.booking-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .booking-layout {
    grid-template-columns: 1fr 1fr;
  }
  .panel-wide {
    grid-column: 1 / -1;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.panel-hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.panel-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.panel-header-actions .panel-title {
  margin-bottom: 0.35rem;
}

.booking-summary-list {
  display: grid;
  gap: 0.7rem;
}

.booking-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.booking-summary-label {
  min-width: 5.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #64748b;
  text-transform: uppercase;
}

.booking-summary-value {
  flex: 1 1 14rem;
  font-size: 0.96rem;
  color: #0f172a;
  word-break: break-word;
}

.booking-note-card {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.booking-note-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.booking-link-notice {
  margin-bottom: 1rem;
}

.booking-link-notice-inline {
  margin-top: 0.85rem;
  margin-bottom: 0;
  max-width: 42rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 0.98rem;
  color: #475569;
}

.booking-multiline-note {
  margin: 0;
  white-space: pre-line;
  line-height: 1.7;
  color: #334155;
}

.admin-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-page-head .page-title {
  margin-bottom: 0.35rem;
}

.admin-page-head .page-lead {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .admin-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-page-head .admin-toolbar {
    width: 100%;
  }
}

/* 2026 refresh: global tone, clearer hierarchy, lower visual noise */
:root {
  --bg: #f5f1ea;
  --surface: rgba(255, 252, 247, 0.92);
  --text: #1d2433;
  --muted: #6f7685;
  --primary: #1f5f52;
  --primary-hover: #17493f;
  --border: rgba(109, 95, 74, 0.16);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(44, 32, 18, 0.08);
  --shadow-md: 0 22px 54px rgba(44, 32, 18, 0.12);
  --header-bg: linear-gradient(135deg, #203246 0%, #18202b 100%);
}

body {
  font-family: "Aptos", "Segoe UI Variable", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(207, 226, 214, 0.55), transparent 26%),
    radial-gradient(circle at top right, rgba(228, 218, 203, 0.8), transparent 24%),
    linear-gradient(180deg, #f7f3ec 0%, #f3efe8 48%, #f8f5ef 100%);
}

.app-header {
  padding: 1rem 1.5rem;
  gap: 1rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px rgba(13, 18, 26, 0.18);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.app-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #c7e0d0, #82af98);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 10px 26px rgba(14, 22, 28, 0.22);
  position: relative;
  flex: 0 0 2.4rem;
}

.app-brand-mark::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border-radius: 0.45rem;
  border: 2px solid rgba(25, 49, 43, 0.72);
}

.app-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.app-brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.app-brand-copy span {
  font-size: 0.75rem;
  color: rgba(246, 241, 232, 0.68);
}

.app-nav a {
  color: rgba(246, 241, 232, 0.72);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-nav a:hover,
.app-nav a.active {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.app-main {
  max-width: 860px;
  padding: 2rem 1.2rem 4rem;
}

.app-footer {
  background: rgba(255, 252, 247, 0.82);
  backdrop-filter: blur(10px);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #365c50;
  background: rgba(199, 224, 208, 0.72);
  border: 1px solid rgba(31, 95, 82, 0.14);
  margin-bottom: 0.85rem;
}

.hero-home {
  margin: -0.15rem 0 1.5rem;
  padding: 2.4rem 2rem 2.2rem;
  background:
    radial-gradient(circle at top right, rgba(231, 214, 191, 0.6), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.98), rgba(246, 241, 232, 0.92));
  border-radius: 28px;
  border: 1px solid var(--border);
}

.hero-home h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.hero-home-lead {
  max-width: 42rem;
  line-height: 1.7;
}

.hero-home-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-home-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(31, 95, 82, 0.08);
  border: 1px solid rgba(31, 95, 82, 0.12);
  color: #365c50;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.setup-flow {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.75rem;
}

@media (min-width: 860px) {
  .setup-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.setup-flow-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.2rem 1.2rem 1.25rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(249, 244, 236, 0.88));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.setup-flow-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 95, 82, 0.24);
  box-shadow: 0 18px 36px rgba(31, 95, 82, 0.12);
}

.setup-flow-card--final {
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.98), rgba(237, 246, 241, 0.9));
}

.setup-flow-no {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1f5f52;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(31, 95, 82, 0.22);
}

.setup-flow-body {
  min-width: 0;
}

.setup-flow-body h2 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #1f2937;
}

.setup-flow-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.setup-flow-action,
.setup-flow-note {
  display: inline-flex;
  margin-top: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f5f52;
}

.setup-flow-action::after {
  content: "→";
  margin-left: 0.35rem;
}

.quick-steps {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

@media (min-width: 860px) {
  .quick-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quick-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.quick-step-no {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1f5f52;
  color: #fff;
  font-weight: 700;
}

.quick-step h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.quick-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  gap: 1rem;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(249, 244, 236, 0.88));
  border-radius: 22px;
  padding: 1.4rem 1.3rem;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(31, 95, 82, 0.22);
  transform: translateY(-2px);
}

.feature-card p {
  min-height: 3.3rem;
  line-height: 1.65;
}

.feature-card-icon--book {
  background: linear-gradient(135deg, #4c8b7b, #1f5f52);
  box-shadow: 0 8px 18px rgba(31, 95, 82, 0.26);
}

.feature-card-icon--cal {
  background: linear-gradient(135deg, #d08b56, #a55b2d);
  box-shadow: 0 8px 18px rgba(165, 91, 45, 0.22);
}

.feature-card-icon--adm {
  background: linear-gradient(135deg, #31455f, #1d2433);
  box-shadow: 0 8px 18px rgba(29, 36, 51, 0.24);
}

.btn {
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn.primary {
  box-shadow: 0 10px 20px rgba(31, 95, 82, 0.18);
}

.btn.primary:hover,
.btn.secondary:hover,
.btn.ghost:hover {
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(255, 252, 247, 0.78);
  color: #243246;
  border-color: rgba(37, 50, 70, 0.14);
}

.btn.secondary:hover {
  background: rgba(241, 235, 225, 0.96);
}

.panel,
.cal-card,
.feature-card,
.summary-card,
.booking-dialog__panel {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(252, 248, 242, 0.88));
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.page-title {
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.page-lead,
.panel-hint,
.muted {
  line-height: 1.7;
}

.admin-console,
.booking-flow {
  display: grid;
  gap: 1rem;
}

.admin-page-head {
  padding: 0.35rem 0 0.15rem;
}

.admin-page-head .admin-toolbar {
  justify-content: flex-end;
}

.summary-cards {
  gap: 0.85rem;
}

.summary-card {
  padding: 1rem 1rem 0.95rem;
}

.summary-card h3 {
  margin-bottom: 0.45rem;
}

.admin-table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #586172;
}

.booking-hero-bar {
  background:
    radial-gradient(circle at top right, rgba(226, 212, 190, 0.55), transparent 24%),
    linear-gradient(145deg, rgba(255, 252, 247, 0.98), rgba(246, 241, 232, 0.92));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.public-shell-header {
  padding: 1.1rem 1.2rem 0;
}

.public-shell-brand {
  max-width: 860px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.public-shell-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.public-shell-copy strong {
  font-size: 0.98rem;
  letter-spacing: 0.05em;
}

.public-shell-copy span {
  font-size: 0.78rem;
  color: #6f7685;
}

.booking-cal-section,
.gcal-card {
  padding: 1.2rem 1.1rem;
}

.booking-dialog__panel {
  border: 1px solid var(--border);
}

@media (max-width: 760px) {
  .app-header {
    padding: 0.9rem 1rem;
  }

  .app-brand-copy span {
    display: none;
  }

  .hero-home {
    padding: 1.8rem 1.2rem;
  }

  .hero-home-steps {
    gap: 0.45rem;
  }

  .hero-home-steps span {
    width: 100%;
    justify-content: center;
  }

  .booking-hero-bar {
    padding: 1.35rem 1rem;
  }
}

/* アカウント等: 1 パネル内の区切り見出し */
.panel-subtitle {
  margin: 1.15rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.panel-subtitle:first-of-type {
  margin-top: 0;
}

.panel-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.accounts-api-toolbar {
  margin-bottom: 0.75rem;
}
.accounts-user-table-wrap {
  margin-top: 0.5rem;
}
.admin-table input.admin-input-inline {
  width: 100%;
  min-width: 7rem;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
}
.accounts-user-actions {
  white-space: normal;
  text-align: right;
}
.accounts-user-actions .btn {
  margin: 0.15rem 0 0.15rem 0.35rem;
}

.field-label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.field-label .req {
  color: #b91c1c;
}

.foot-hint {
  margin: 1rem 0 0.75rem;
  font-size: 0.85rem;
}

.loading-text {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.loading-text[hidden],
.booking-cal-loading[hidden] {
  display: none !important;
}

.booking-cal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 3;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.booking-cal-wrap.is-loading .gcal-grid {
  opacity: 0.72;
}

.mini-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(31, 95, 82, 0.18);
  border-top-color: #1f5f52;
  animation: bookingSpin 0.7s linear infinite;
  flex: 0 0 auto;
}

.loading-dots {
  width: 2rem;
  height: 0.5rem;
  display: inline-block;
  border-radius: 999px;
  background:
    radial-gradient(circle closest-side, #1f5f52 90%, transparent) 0 50% / 0.42rem 0.42rem no-repeat,
    radial-gradient(circle closest-side, #1f5f52 90%, transparent) 50% 50% / 0.42rem 0.42rem no-repeat,
    radial-gradient(circle closest-side, #1f5f52 90%, transparent) 100% 50% / 0.42rem 0.42rem no-repeat;
  animation: bookingDots 0.95s infinite linear;
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

@keyframes bookingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bookingDots {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes bookingShimmer {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}

.app-busy-indicator {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(18, 43, 70, 0.92);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

body.app-busy {
  cursor: progress;
}

body.app-busy .btn,
body.app-busy button,
body.app-busy a {
  cursor: progress;
}

.slots-grid {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.slot-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.slot-btn:hover {
  border-color: var(--primary);
}

.slot-btn.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  background: #eff6ff;
}

.btn-submit {
  margin-top: 1rem;
}

.admin-console .admin-section {
  margin-bottom: 1.25rem;
}

/* 設定ページ: 組織 slug ブロックへの目印 */
.settings-slug-callout {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border-radius: var(--radius);
  font-size: 0.93rem;
  line-height: 1.5;
}

.oauth-setup-admin .admin-uri-box,
.oauth-setup-admin.cal-uri-box {
  margin-top: 0.5rem;
}

.admin-details {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.admin-details .admin-json {
  margin-top: 0.5rem;
}

.admin-row.align-end {
  align-items: flex-end;
}

.admin-field-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.35rem;
}

.admin-row.align-start {
  align-items: flex-start;
}

.admin-row.wrap {
  align-items: flex-start;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.section-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.section-actions .btn {
  min-width: 10rem;
}

.admin-input-sm {
  width: 6.5rem;
  max-width: 100%;
}

.admin-staff-inp {
  width: min(100%, 12rem);
  max-width: 14rem;
  font-size: 0.85rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.admin-td-gprof {
  font-size: 0.85rem;
  min-width: 8rem;
}

.admin-gprof-name {
  font-weight: 600;
}

.admin-gprof-email {
  font-size: 0.78rem;
}

.admin-field {
  flex: 1;
  min-width: 200px;
}

.admin-field.grow {
  flex: 2;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}

.summary-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.summary-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.summary-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-card p {
  margin: 0;
  font-size: 0.92rem;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  background: #eef2f7;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.admin-status-badge.ok {
  background: #ecfdf3;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.18);
}

.admin-status-badge.warn {
  background: #fff7ed;
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.18);
}

.admin-status-badge.err {
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.16);
}

.admin-status-badge.muted {
  background: #f8fafc;
  color: #64748b;
}

.audit-log-action {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.8rem;
}

.audit-log-detail-list {
  display: grid;
  gap: 0.2rem;
  min-width: 16rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

.admin-reason-list {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.url-cell {
  font-size: 0.78rem;
  word-break: break-all;
}

.staff-checks {
  border: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
}

.staff-checks legend {
  padding: 0;
}

.staff-priority-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.staff-priority-row:last-child {
  border-bottom: 0;
}

.staff-priority-check {
  flex: 1 1 auto;
  min-width: 16rem;
  margin: 0;
}

.staff-priority-name {
  display: inline-flex;
  align-items: center;
  line-height: 1.35;
}

.staff-priority-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.staff-priority-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.staff-priority-input .admin-input-sm {
  width: 5.5rem;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0;
  font-weight: normal;
  cursor: pointer;
}

.check-line input {
  width: auto;
  margin: 0;
}

.admin-row-muted {
  opacity: 0.65;
}

.admin-avail-section {
  margin: 1.1rem 0 1.25rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
}

.admin-avail-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.admin-avail-section-lead {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.admin-avail-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
}

.admin-avail-time-sep {
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 0.35rem;
}

.admin-input-time {
  min-width: 7rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

/* 公開予約URLのみ表示（ヘッダー・フッターなし） */
.public-booking-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg, #f1f5f9);
}

.public-booking-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .public-booking-main {
    padding: 1.25rem 1.5rem 2.5rem;
  }
}

.cal-title-template-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(248, 250, 252, 0.85);
  margin-top: 0.35rem;
}

.cal-title-hint-top {
  margin: 0 0 0.5rem;
}

.cal-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
}

.cal-title-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0.35rem 0 0.65rem;
}

.cal-title-chip-label {
  width: 100%;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.cal-title-free-text-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  align-items: end;
  gap: 0.45rem;
  margin: 0.2rem 0 0.7rem;
  max-width: 30rem;
}

.cal-title-free-text-row .cal-title-chip-label {
  grid-column: 1 / -1;
}

.cal-title-free-text-input {
  min-height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.cal-title-template-input {
  max-width: 100%;
}

.cal-title-builder-field {
  display: block;
  width: 100%;
  min-height: 3rem;
  margin: 0.45rem 0 0.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.cal-title-builder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.9rem;
}

.cal-title-builder-placeholder {
  font-size: 0.9rem;
  color: var(--muted);
}

.cal-title-builder-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.38rem 0.28rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #d8e4db;
  background: #f8fbf9;
  color: #20302a;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  white-space: nowrap;
  max-width: 100%;
}

.cal-title-builder-chip.is-token {
  background: #edf7f1;
  border-color: #cfe4d8;
}

.cal-title-builder-chip.is-text {
  background: #f7f4ee;
  border-color: #e6ddd0;
}

.cal-title-builder-chip.is-symbol {
  gap: 0.18rem;
  padding: 0.16rem 0.22rem 0.16rem 0.38rem;
  background: #fbfaf7;
  border-color: #eadfce;
}

.cal-title-builder-label {
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.cal-title-builder-chip.is-symbol .cal-title-builder-label {
  font-size: 0.82rem;
}

button.cal-title-builder-remove,
.cal-title-builder-chip .cal-title-builder-remove {
  appearance: none;
  border: 1px solid rgba(111, 118, 133, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: #68707f;
  width: 0.96rem;
  height: 0.96rem;
  min-width: 0;
  max-width: none;
  inline-size: 0.96rem;
  block-size: 0.96rem;
  border-radius: 999px;
  font-size: 0.62rem;
  line-height: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cal-title-builder-remove:hover {
  color: #1d2433;
  border-color: rgba(29, 36, 51, 0.24);
  background: #fff;
}

.cal-title-preview-line {
  font-size: 0.88rem;
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border-radius: 6px;
  border: 1px dashed var(--border);
  line-height: 1.4;
}

/* --- Google カレンダー風・予約カレンダー拡張 --- */
.cal-banner.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.gcal-page-title {
  letter-spacing: -0.02em;
}

.gcal-card {
  border-radius: 8px;
  border-color: #dadce0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.cal-setup-steps {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--text);
}

.cal-setup-steps li {
  margin: 0.35rem 0;
}

.cal-oauth-details {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.cal-oauth-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style-position: outside;
}

.cal-oauth-details[open] summary {
  margin-bottom: 0.35rem;
}

.cal-oauth-details .cal-setup-steps {
  margin-top: 0.35rem;
}

.cal-uri-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.cal-uri-box code {
  flex: 1;
  min-width: 200px;
  word-break: break-all;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.gcal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
}

.gcal-view-toggle {
  display: inline-flex;
  border: 1px solid #dadce0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.gcal-seg {
  border: none;
  background: #fff;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: #5f6368;
}

.gcal-seg:hover {
  background: #f1f3f4;
}

.gcal-seg.active {
  background: #e8f0fe;
  color: #1967d2;
}

.gcal-today {
  border: 1px solid #dadce0;
  background: #fff;
  color: #1967d2;
  font-weight: 600;
}

.gcal-nav {
  display: inline-flex;
  gap: 0.25rem;
}

.gcal-arrow {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
}

.gcal-title {
  margin-left: auto;
  font-weight: 500;
  font-size: 1.05rem;
  color: #3c4043;
}

.gcal-legend {
  border-bottom: 1px solid #e8eaed;
  padding-bottom: 0.65rem;
}

.gcal-wrap {
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  max-height: min(85vh, 960px);
  overflow: auto;
}

.booking-cal-wrap.gcal-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}

.booking-cal-wrap.gcal-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.gcal-wrap-day {
  max-height: min(88vh, 1200px);
}

.gcal-grid {
  min-width: 0;
}

.gcal-grid-week {
  min-width: 720px;
}

.gcal-grid-day {
  min-width: 320px;
}

.gcal-head {
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid #dadce0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.gcal-head-week {
  grid-template-columns: 56px repeat(7, minmax(72px, 1fr));
}

.gcal-head-day {
  grid-template-columns: 56px 1fr;
}

.gcal-corner {
  border-right: 1px solid #dadce0;
  min-height: 42px;
  background: #fff;
}

.gcal-head-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-left: 1px solid #dadce0;
}

.gcal-head-dow {
  font-size: 0.75rem;
  color: #70757a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gcal-head-dom {
  font-size: 1.75rem;
  font-weight: 400;
  color: #3c4043;
  line-height: 1.2;
}

.gcal-head-daycell {
  text-align: center;
  padding: 0.3rem 0.2rem;
  border-right: 1px solid #dadce0;
}

.gcal-head-daycell:last-child {
  border-right: none;
}

.gcal-dow {
  display: inline-block;
  font-size: 0.78rem;
  color: #70757a;
  font-weight: 500;
  margin-left: 0.22rem;
}

.gcal-dom {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 400;
  color: #3c4043;
  margin-top: 0;
}

.gcal-head-daycell.is-today {
  background: #eef6ff;
}

.gcal-dow-inline {
  display: inline-block;
}

.gcal-body {
  display: grid;
  position: relative;
}

.gcal-body-week {
  grid-template-columns: 56px repeat(7, minmax(72px, 1fr));
}

.gcal-body-day {
  grid-template-columns: 56px 1fr;
}

.gcal-rail {
  border-right: 1px solid #dadce0;
  background: #fff;
}

.gcal-rail-hour {
  font-size: 0.68rem;
  color: #70757a;
  padding-right: 6px;
  text-align: right;
  border-bottom: 1px solid #e8eaed;
  box-sizing: border-box;
  line-height: 1;
  padding-top: 1px;
}

.gcal-col {
  position: relative;
  border-right: 1px solid #e8eaed;
  background: #fff;
}

.gcal-col.is-today {
  background: rgba(26, 115, 232, 0.04);
}

.gcal-col:last-child {
  border-right: none;
}

.gcal-slot {
  border-bottom: 1px solid #e8eaed;
  box-sizing: border-box;
  position: relative;
}

.gcal-slot-half {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed #f1f3f4;
  pointer-events: none;
}

.gcal-events-layer {
  pointer-events: none;
}

.gcal-event {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.74rem;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
}

.gcal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ea4335;
  z-index: 3;
  pointer-events: none;
}

.gcal-now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ea4335;
}

.gcal-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
  margin-right: 0.35rem;
}

.gcal-google-btn:hover:not(:disabled) {
  background: #f8f9fa !important;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.28);
}

.gcal-g-icon {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: conic-gradient(
    #4285f4 0deg 90deg,
    #ea4335 90deg 180deg,
    #fbbc04 180deg 270deg,
    #34a853 270deg 360deg
  );
  flex-shrink: 0;
}

.cal-td-actions {
  white-space: nowrap;
}

.cal-td-actions .btn {
  margin-bottom: 0;
  margin-right: 0.25rem;
}

.gcal-staff-table {
  margin-top: 0.5rem;
}

.cal-schedule-card {
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .gcal-title {
    width: 100%;
    margin-left: 0;
  }
}
