.page-book {
  background:
    radial-gradient(640px 320px at 0% -4%, rgba(48, 112, 147, 0.22), transparent 62%),
    radial-gradient(520px 280px at 100% 8%, rgba(184, 148, 74, 0.2), transparent 58%),
    linear-gradient(180deg, #f7f3ec 0%, #efe8dc 100%);
}

.book {
  position: relative;
  padding: 1.75rem 0 3.5rem;
}

.book__intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0.15rem 0 0.6rem;
}

.book__intro p:last-child {
  margin: 0;
  max-width: 38rem;
  color: var(--ink-muted);
  font-size: 1.08rem;
}

.book-criteria,
.table-list,
.book-sheet,
.book-note {
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 18px 50px rgba(21, 47, 61, 0.08);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.book-criteria {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 0.9fr 1.15fr auto;
  gap: 0;
  margin: 1.5rem 0 1.15rem;
  border-radius: 22px;
  overflow: hidden;
}

.book-criteria label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1rem 1rem;
  border-right: 1px solid rgba(21, 47, 61, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.book-criteria label:last-child { border-right: 0; }

.book-criteria input,
.book-criteria select {
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
}

.book-check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.6rem !important;
  font-size: 0.95rem !important;
  font-weight: 650 !important;
  color: var(--ink) !important;
  min-width: 11rem;
}

.book-check input {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 0;
  accent-color: var(--brand);
}

.book-stage { position: relative; }

.floor-tools {
  position: absolute;
  z-index: 4;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(16, 24, 32, 0.18);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.floor-tools button,
.book-submit,
.pin { font: inherit; }

.floor-tools button {
  min-height: 38px;
  min-width: 38px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.floor-tools button:hover,
.floor-tools button:focus-visible {
  background: rgba(48, 112, 147, 0.12);
  color: var(--brand-deep);
}

.floor-viewport {
  overflow: auto;
  width: 100%;
  max-height: min(70vh, 760px);
  background: #101820;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 50px rgba(21, 47, 61, 0.16);
  touch-action: pan-x pan-y;
}

.floor-stage { position: relative; width: 100%; margin: 0; background: #1b2830; }
.floor-stage img { width: 100%; height: auto; max-width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.floor-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.table-shape {
  stroke-linejoin: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
}
body:not(.mgr) .table-shape {
  animation: none;
  cursor: pointer;
  transition:
    fill 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    stroke 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    stroke-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
body:not(.mgr) .table-shape--available {
  fill: rgba(72, 214, 130, 0.07);
  stroke: rgba(198, 255, 222, 0.55);
  stroke-width: 1.35;
  filter:
    drop-shadow(0 0 1px rgba(220, 255, 236, 0.2))
    drop-shadow(0 0 4px rgba(72, 214, 130, 0.12))
    drop-shadow(0 0 0 rgba(46, 190, 110, 0))
    drop-shadow(0 0 0 rgba(40, 170, 100, 0));
}
body:not(.mgr) .table-shape--unavailable {
  fill: rgba(196, 72, 64, 0.07);
  stroke: rgba(255, 186, 178, 0.5);
  stroke-width: 1.3;
  filter:
    drop-shadow(0 0 1px rgba(255, 210, 204, 0.16))
    drop-shadow(0 0 4px rgba(196, 72, 64, 0.1))
    drop-shadow(0 0 0 rgba(180, 50, 42, 0))
    drop-shadow(0 0 0 rgba(140, 36, 30, 0));
}
body:not(.mgr) .table-shape--disabled {
  fill: rgba(120, 128, 136, 0.05);
  stroke: rgba(214, 218, 222, 0.35);
  stroke-width: 1.2;
  filter:
    drop-shadow(0 0 0 rgba(230, 232, 234, 0))
    drop-shadow(0 0 0 rgba(150, 156, 162, 0))
    drop-shadow(0 0 0 rgba(140, 148, 156, 0))
    drop-shadow(0 0 0 rgba(120, 128, 136, 0));
}
body:not(.mgr) .table-shape.is-selected {
  fill: rgba(72, 214, 130, 0.16);
  stroke: rgba(214, 255, 230, 0.92);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-dasharray: 1.7 1.35;
  filter:
    drop-shadow(0 0 1px rgba(220, 255, 236, 0.45))
    drop-shadow(0 0 7px rgba(72, 214, 130, 0.32))
    drop-shadow(0 0 0 rgba(46, 190, 110, 0))
    drop-shadow(0 0 0 rgba(40, 170, 100, 0));
  animation: outline-march 2.8s linear infinite;
}
.table-shape--available {
  fill: rgba(72, 214, 130, 0.28);
  stroke: rgba(186, 255, 214, 0.95);
  filter: drop-shadow(0 0 6px rgba(72, 214, 130, 0.85));
  animation: table-glow 2.4s ease-in-out infinite;
}
.table-shape--unavailable {
  fill: rgba(196, 72, 64, 0.22);
  stroke: rgba(255, 170, 162, 0.8);
}
.table-shape--disabled {
  fill: rgba(120, 128, 136, 0.18);
  stroke: rgba(210, 214, 218, 0.55);
}
.table-shape.is-selected {
  fill: rgba(228, 195, 106, 0.42);
  stroke: #ffe7a3;
  filter: drop-shadow(0 0 10px rgba(228, 195, 106, 0.95));
  animation: table-glow-selected 1.5s ease-in-out infinite;
}
body:not(.mgr) .table-shape--available.is-hot {
  fill: rgba(72, 214, 130, 0.28);
  stroke: rgba(226, 255, 238, 0.96);
  stroke-width: 2.4;
  filter:
    drop-shadow(0 0 2px rgba(236, 255, 244, 0.95))
    drop-shadow(0 0 12px rgba(110, 235, 165, 0.9))
    drop-shadow(0 0 28px rgba(52, 196, 120, 0.55))
    drop-shadow(0 0 48px rgba(40, 170, 100, 0.28));
  animation: none;
}
body:not(.mgr) .table-shape--unavailable.is-hot {
  fill: rgba(196, 72, 64, 0.26);
  stroke: rgba(255, 196, 188, 0.92);
  stroke-width: 2.2;
  filter:
    drop-shadow(0 0 2px rgba(255, 220, 214, 0.9))
    drop-shadow(0 0 12px rgba(230, 96, 84, 0.75))
    drop-shadow(0 0 26px rgba(180, 50, 42, 0.4))
    drop-shadow(0 0 42px rgba(140, 36, 30, 0.22));
  animation: none;
}
body:not(.mgr) .table-shape--disabled.is-hot {
  fill: rgba(120, 128, 136, 0.16);
  stroke: rgba(226, 230, 234, 0.7);
  stroke-width: 2;
  filter:
    drop-shadow(0 0 2px rgba(240, 242, 244, 0.7))
    drop-shadow(0 0 10px rgba(180, 188, 196, 0.45))
    drop-shadow(0 0 22px rgba(140, 148, 156, 0.25))
    drop-shadow(0 0 36px rgba(120, 128, 136, 0.12));
  animation: none;
}
body:not(.mgr) .table-shape.is-selected.is-hot {
  fill: rgba(72, 214, 130, 0.24);
  stroke: rgba(232, 255, 242, 0.98);
  stroke-width: 2.4;
  stroke-dasharray: 1.7 1.35;
  filter:
    drop-shadow(0 0 1px rgba(236, 255, 244, 0.7))
    drop-shadow(0 0 10px rgba(110, 235, 165, 0.45))
    drop-shadow(0 0 18px rgba(52, 196, 120, 0.22))
    drop-shadow(0 0 0 rgba(40, 170, 100, 0));
  animation: outline-march 2.8s linear infinite;
}
@keyframes outline-march {
  to { stroke-dashoffset: -3.05; }
}
@keyframes table-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(72, 214, 130, 0.55)); }
  50% { filter: drop-shadow(0 0 14px rgba(170, 255, 205, 0.95)); }
}
@keyframes table-glow-selected {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(228, 195, 106, 0.7)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 226, 150, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  .table-shape--available,
  .table-shape.is-selected,
  body:not(.mgr) .table-shape.is-selected { animation: none; }
  body:not(.mgr) .table-shape.is-selected { stroke-dasharray: none; }
  body:not(.mgr) .table-shape,
  body:not(.mgr) .pin { transition-duration: 0.01ms; }
}

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 36px;
  height: 36px;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: #fff;
  font-weight: 750;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.pin__icon { font-size: 0.8rem; line-height: 1; }
.pin--available { background: rgba(28, 107, 69, 0.92); }
.pin--unavailable { background: rgba(157, 59, 52, 0.92); }
.pin--disabled { background: rgba(102, 112, 120, 0.92); }
.pin.is-selected { outline: 3px solid #e4c36a; outline-offset: 2px; z-index: 3; }

body:not(.mgr) .pin {
  min-width: 2.85rem;
  min-height: 2.85rem;
  height: auto;
  padding: 0.32rem 0.72rem;
  border: 0;
  border-radius: 999px;
  color: #f6f0e4;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(180deg, rgba(28, 58, 48, 0.94), rgba(12, 28, 26, 0.9));
  box-shadow:
    0 0 0 1.5px rgba(236, 214, 156, 0.95),
    0 0 0 5px rgba(8, 16, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 22px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(96, 214, 150, 0.28);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body:not(.mgr) .pin__icon {
  width: 0.42rem;
  height: 0.42rem;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background: #9cf0c0;
  box-shadow:
    0 0 0 3px rgba(156, 240, 192, 0.18),
    0 0 10px rgba(156, 240, 192, 0.95);
}

body:not(.mgr) .pin--unavailable {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(92, 36, 34, 0.94), rgba(42, 16, 16, 0.9));
  box-shadow:
    0 0 0 1.5px rgba(214, 164, 140, 0.7),
    0 0 0 5px rgba(8, 16, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 22px rgba(0, 0, 0, 0.34);
}

body:not(.mgr) .pin--unavailable .pin__icon {
  background: #f0a097;
  box-shadow:
    0 0 0 3px rgba(240, 160, 151, 0.16),
    0 0 8px rgba(240, 140, 128, 0.7);
}

body:not(.mgr) .pin--disabled {
  color: rgba(246, 240, 228, 0.72);
  background:
    linear-gradient(180deg, rgba(72, 80, 86, 0.92), rgba(42, 48, 52, 0.9));
  box-shadow:
    0 0 0 1.5px rgba(190, 186, 176, 0.45),
    0 0 0 5px rgba(8, 16, 18, 0.22),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

body:not(.mgr) .pin--disabled .pin__icon {
  background: #c5c8ca;
  box-shadow: none;
}

body:not(.mgr) .pin:hover,
body:not(.mgr) .pin:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 4;
  box-shadow:
    0 0 0 1.5px rgba(255, 236, 186, 1),
    0 0 0 6px rgba(120, 230, 168, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 16px 28px rgba(0, 0, 0, 0.4),
    0 0 26px rgba(130, 245, 180, 0.55);
}

body:not(.mgr) .pin.is-selected {
  outline: none;
  z-index: 5;
  color: #3a2c12;
  text-shadow: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.72), transparent 48%),
    linear-gradient(180deg, #fff1c8, #e4c36a);
  box-shadow:
    0 0 0 1.5px rgba(255, 248, 226, 1),
    0 0 0 6px rgba(184, 140, 48, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 26px rgba(70, 46, 8, 0.32),
    0 0 28px rgba(228, 195, 106, 0.72);
}

body:not(.mgr) .pin.is-selected .pin__icon {
  background: #8a5a10;
  box-shadow: 0 0 0 3px rgba(138, 90, 16, 0.16);
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  gap: 1rem;
  align-items: start;
}

.table-list,
.book-sheet,
.book-note {
  border-radius: 24px;
  padding: 1.1rem 1.1rem 1.15rem;
}

.table-list { margin-top: 0.9rem; }

.table-list h2,
.book-sheet h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.table-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.table-option strong { font-size: 1.02rem; }
.table-option small { color: var(--ink-muted); }
.table-option:hover { background: rgba(255, 255, 255, 0.72); }
.table-option.is-selected {
  background: rgba(232, 248, 238, 0.78);
  border-color: rgba(46, 158, 96, 0.4);
  box-shadow: inset 3px 0 0 #1f8a52, 0 8px 18px rgba(46, 158, 96, 0.1);
}

.book-sheet[hidden],
.table-card[hidden] { display: none; }

.book-sheet { position: sticky; top: calc(var(--header-h) + 14px); }

.book-sheet label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.book-sheet input,
.book-sheet textarea {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 550;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.book-sheet textarea { min-height: 96px; }

.book-sheet input:focus,
.book-sheet textarea:focus,
.book-criteria input:focus,
.book-criteria select:focus {
  outline: none;
  border-color: rgba(48, 112, 147, 0.55);
  box-shadow: 0 0 0 4px rgba(48, 112, 147, 0.14);
}

.book-summary {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.95rem;
  color: var(--ink);
  font-weight: 650;
}

.book-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d86a8, var(--brand-deep));
  color: #fff;
  font-weight: 750;
  font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(26, 76, 104, 0.28);
}

.book-submit:hover { filter: brightness(1.05); }

.book-error {
  color: #8d2f2f;
  font-weight: 700;
  min-height: 1.2em;
}

.book-error:not(:empty) {
  margin: 0 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(253, 236, 235, 0.8);
  border: 1px solid rgba(232, 180, 176, 0.8);
}

.req { color: #c44740; font-weight: 750; }

.book-note a { color: var(--brand-deep); font-weight: 750; }

.book-confirm {
  max-width: 36rem;
  margin: 1.25rem auto;
  padding: 1.7rem 1.5rem 1.5rem;
}

.book-confirm h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}

.book-confirm p { margin: 0 0 0.75rem; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 980px) {
  .book-criteria { grid-template-columns: 1fr 1fr; }
  .book-criteria label { border-bottom: 1px solid rgba(21, 47, 61, 0.08); }
  .book-layout { grid-template-columns: 1fr; }
  .book-sheet { position: static; }
}

@media (max-width: 640px) {
  .book { padding-top: 1.15rem; }
  .book-criteria { grid-template-columns: 1fr; border-radius: 20px; }
  .book-criteria label { border-right: 0; }
  .floor-viewport { max-height: 62vh; border-radius: 20px; }
  .floor-tools { left: 0.55rem; right: 0.55rem; width: auto; }
  .table-list,
  .book-sheet,
  .book-note { border-radius: 20px; }
}

body:not(.mgr) .book-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  border: 0;
  border-radius: 0;
  background: rgba(16, 28, 36, 0.52);
  box-shadow: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: auto;
}

body:not(.mgr) .book-sheet[hidden] { display: none; }

body:not(.mgr) .book-dialog {
  position: relative;
  width: min(440px, 100%);
  margin: auto;
  border-radius: 24px;
  padding: 1.25rem 1.15rem 1.15rem;
  background: rgba(255, 253, 248, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 60px rgba(16, 24, 32, 0.32);
}

body:not(.mgr) .book-dialog__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 47, 61, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

body:not(.mgr) .book-dialog .book-error { min-height: 0; }
body:not(.mgr) .book-dialog .book-error:empty { display: none; }

body.book-open { overflow: hidden; }
