#roomContainer {
  flex: 1;
  /* A flex item's default minimum is its content's width, and the room inside
     is 3025px wide: without this the room would refuse to shrink and push the
     step panel out of the viewport. */
  min-width: 0;
  height: 100vh;
  background: var(--bgSoft);
}
@media (max-width: 1000px) {
  #roomContainer {
    flex: unset;
    height: 80vh;
  }
}
#roomScrollable {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  /* A hold-to-grab (touch.ts) must not open Safari's callout or selection magnifier. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.moveHandle,
.resizeHandle,
.rotateHandle {
  -webkit-tap-highlight-color: transparent;
}
/* Touch drags (touch.ts): no custom cursor image under a finger, and a lifted
   look on the grabbed (selected) table so the hold is felt to take. */
.touchDragging #customCursor {
  display: none !important;
}
.touchDragging .highlightedTable .tableContent {
  box-shadow: 0 8px 24px #0004;
}
.touchDragging .highlightedTable .benchTopBorder {
  box-shadow: 0 8px 24px #000;
}
.touchDragging .benchTable .tableContent {
  box-shadow: none;
}
#roomSizer {
  position: relative;
  overflow: hidden;
  width: 3025px;
  height: 3025px;
}
#room {
  background: var(--bgSoft);
  width: 3025px;
  height: 3025px;
}
#canvas {
  cursor: grab;
}
.isGrabbing #canvas {
  cursor: grabbing;
}
.hideCursor #canvas {
  cursor: none !important;
}

.table {
  position: absolute;
  top: 0;
  left: 0;
  width: 75px;
  height: 75px;
  transform: translate(-50%, -50%);
}
.table:hover {
  opacity: 1 !important;
}
.roundTable {
  border-radius: 50%;
}
.squareTable .tableContent {
  width: 100%;
  height: 100%;
  border: 3px solid var(--grey);
  background: var(--tableFill) !important;
  border-radius: 16px;
  z-index: 5;
  transition: 0.3s;
}
.roundTable .tableContent {
  width: 100%;
  height: 100%;
  border: 3px solid var(--grey);
  background: var(--tableFill) !important;
  z-index: 5;
  transition: 0.3s;
  border-radius: 50%;
}
.benchTable .tableContent {
  width: 100%;
  height: 100%;
  border-top: 3px solid var(--grey);
  background: none !important;
  z-index: 5;
  transition: 0.3s;
  pointer-events: none;
}
.benchTopBorder {
  width: 100%;
  height: 3px;
  top: -3px;
}

.moveHandle {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 16px;
  width: 100%;
  height: 100%;
  z-index: 6;
}
.benchTable .moveHandle {
  top: -10px;
  width: calc(100% - 25px);
  left: 12.5px;
}
.preferenceMode .table,
.preferenceMode .moveHandle {
  cursor: pointer;
}
.isGrabbing .moveHandle {
  cursor: grabbing;
}
.roundTable .moveHandle {
  position: absolute;
  top: 6px;
  left: 6px;
  border-radius: 50%;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  z-index: 8;
}
.hideCursor .moveHandle:hover {
  cursor: none !important;
}

.roundResize {
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  top: -6px;
  left: -6px;
  border-radius: 50%;
}
.topBorderResize {
  width: 100%;
  height: 16px;
  top: -6px;
  left: 0;
}
.leftBorderResize {
  width: 16px;
  height: 100%;
  top: 0;
  left: -6px;
}
.bottomBorderResize {
  width: 100%;
  height: 16px;
  bottom: -6px;
  left: 0;
}
.rightBorderResize {
  width: 16px;
  height: 100%;
  top: 0;
  right: -6px;
}
.topLeftResize {
  top: -6px;
  left: -6px;
}
.topRightResize {
  top: -6px;
  right: -6px;
}
.bottomLeftResize {
  bottom: -6px;
  left: -6px;
}
.bottomRightResize {
  bottom: -6px;
  right: -6px;
}
.cornerResize {
  width: 20px;
  height: 20px;
  z-index: 9;
  border-radius: 50%;
}
.leftBenchResize {
  top: -7px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--grey);
  z-index: 11;
  transition: 0.3s;
}
.rightBenchResize {
  top: -7px;
  right: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--grey);
  z-index: 11;
  transition: 0.3s;
}
.resizeHandle {
  position: absolute;
  z-index: 7;
}

.roundReshape {
  top: 50%;
  right: -6px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--grey);
  z-index: 11;
  transition: 0.3s;
}
.roundReshape:hover {
  right: -8px;
  width: 20px;
  height: 20px;
}

.rotateHandle {
  top: -25px;
  left: -25px;
  width: calc(100% + 50px);
  height: calc(100% + 50px);
  border-radius: 25px;
  position: absolute;
}
.roundTable .rotateHandle {
  border-radius: 50%;
}
.benchTable .rotateHandle {
  height: calc(100% + 30px);
  width: calc(100% + 25px);
  top: -25px;
  left: -12.5px;
}

/* Finger-sized hit areas for the invisible resize handles (touch.ts grabs them
   on a hold). The round table's move handle is inset to match so its edge ring
   stays reachable. Placed after the base handle rules: a media query adds no
   specificity, so these only win by coming later. */
@media (pointer: coarse) {
  .topBorderResize,
  .bottomBorderResize {
    height: 28px;
  }
  .leftBorderResize,
  .rightBorderResize {
    width: 28px;
  }
  .topBorderResize,
  .topLeftResize,
  .topRightResize {
    top: -12px;
  }
  .bottomBorderResize,
  .bottomLeftResize,
  .bottomRightResize {
    bottom: -12px;
  }
  .leftBorderResize,
  .topLeftResize,
  .bottomLeftResize {
    left: -12px;
  }
  .rightBorderResize,
  .topRightResize,
  .bottomRightResize {
    right: -12px;
  }
  .cornerResize {
    width: 32px;
    height: 32px;
  }
  .roundResize {
    width: calc(100% + 24px);
    height: calc(100% + 24px);
    top: -12px;
    left: -12px;
  }
  .roundTable .moveHandle {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
  }
  .rotateHandle {
    top: -30px;
    left: -30px;
    width: calc(100% + 60px);
    height: calc(100% + 60px);
  }
}

.tableLabel {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.chair {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.chairIsChair .chairContent {
  width: 40px;
  height: 40px;
  border: 3px solid black;
  border-radius: 50%;
  transition: 0.3s;
}
.chairIsChair:hover .chairContent {
  transform: scale(1.1);
}
.chairIsSpot .chairContent {
  margin-top: 10px;
  margin-left: 10px;
  width: 20px;
  height: 20px;
  transition: 0.3s;
  border-radius: 50%;
}
.chairIsSpot:hover .chairContent {
  transform: scale(1.5);
}
.chairLabel {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.placementMode .chairIsChair .chairContent {
  background: var(--tableFill) !important;
  border-width: 4px;
  border-style: dashed;
  opacity: 0.6;
}
.placementMode .chairIsChair .chairContent:hover {
  opacity: 1;
}
.placementMode .chairIsChair .chairContent:has(.guestBall) {
  opacity: 1;
}
.placementMode .chairIsSpot {
  pointer-events: none;
  opacity: 0;
}
.placementMode .notHighlightedChair:has(.guestBall) {
  opacity: 0.4;
}

.chairContent .guestBall {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}
.chairContent .guestBall:hover {
  width: 40px;
  height: 40px;
  margin: 0;
  box-shadow: 0 0 3px #0006;
  cursor: grab;
}
.buildMode .guestBall {
  pointer-events: none;
  opacity: 0 !important;
}
.preferenceMode .table .guestBall {
  pointer-events: none;
  opacity: 0 !important;
}

#tools {
  position: absolute;
  top: calc(var(--headerHeight) + 16px);
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  pointer-events: none;
}
#roomTabBar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  overflow-x: scroll;
}
/* The account's word (projects.ts renderProjectsStatus), above the room
   tabs in the bottom right corner: a save that cannot land (red), or
   another computer's version just taken in (for a few seconds). Hidden
   when all is well, which is nearly always. */
#syncPill[hidden] {
  display: none;
}
#syncPill {
  position: absolute;
  right: 16px;
  /* 16px above the room tabs (37px tall), as from the side. */
  bottom: 53px;
  z-index: 2;
  max-width: min(360px, calc(100% - 32px));
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0px 4px 16px 2px #0001;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--textMuted);
  pointer-events: none;
}
#syncPill.syncPillError {
  color: var(--redDark);
  border-color: var(--redDark);
}
#roomTabBarButtons {
  display: inline-flex;
  flex-direction: row;
  pointer-events: none;
  margin-right: 100px;
}
.roomTabButton {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 4px 4px 4px 12px;
  border-radius: 0;
  border-top-right-radius: 8px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  cursor: pointer;
  pointer-events: all;
  margin-left: -6px;
}
.roomTabButton:hover {
  border-color: var(--buttonBorderHover);
}
.activeRoomTab {
  background: var(--strong);
  border-color: var(--strong);
  color: var(--onStrong);
}
.activeRoomTab:hover {
  border-color: var(--strong);
}
.roomTabInput {
  margin: 0 4px;
  border: none;
  background: none;
  cursor: pointer;
  width: 90px;
  padding: 4px 8px;
  font-size: 0.8rem;
  line-height: 1.12rem;
  color: var(--textMuted);
}
.activeRoomTab .roomTabInput {
  cursor: text;
  color: var(--onStrong);
}
.roomTabDeleteIcon {
  width: 28px !important;
  height: 28px !important;
}
.roomTabDeleteIcon svg {
  width: 16px !important;
  height: 16px !important;
}
.addRoomButton {
  padding: 8px 8px 8px 16px;
  justify-content: center;
}
#addTableTools {
  pointer-events: all;
}
#addTableButton {
  cursor: default;
}
.addTableButtonInner {
  display: flex;
  align-items: center;
}
#tableToolsContainer {
  position: absolute;
  width: 180px;
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  height: 0;
}
.toolButton {
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.12rem;
  border: 1px solid var(--border);
  color: var(--textMuted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  align-self: stretch;
  pointer-events: all;
  z-index: 0;
  overflow: hidden;
}
.toolButton p {
  font-size: 0.8rem;
  line-height: 1.12rem;
}
.toolButton:hover {
  border-color: var(--buttonBorderHover);
}
#zoomInButton {
  height: 42px;
}
#zoomOutButton {
  height: 42px;
}
.tableButton {
  font-size: 0.8rem;
  line-height: 1.12rem;
  color: var(--textMuted);
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  align-self: stretch;
  pointer-events: all;
  z-index: 0;
  overflow: hidden;
  padding: 16px 16px 16px 44px;
  border-radius: 0;
}
.tableButton:hover {
  background: var(--bgHover);
}
.squareIcon {
  width: 17px;
  height: 17px;
  border: 2px solid var(--grey);
  border-radius: 4px;
  position: absolute;
  left: 17.5px;
}
.rectangleIcon {
  width: 19px;
  height: 14px;
  border: 2px solid var(--grey);
  border-radius: 4px;
  position: absolute;
  left: 16.5px;
}
.circleIcon {
  width: 19px;
  height: 19px;
  border: 2px solid var(--grey);
  border-radius: 50%;
  position: absolute;
  left: 16.5px;
}
.ovalIcon {
  width: 20px;
  height: 16px;
  border: 2px solid var(--grey);
  border-radius: 50%;
  position: absolute;
  left: 16px;
}
.benchIcon {
  width: 20px;
  height: 2px;
  border: 1px solid var(--grey);
  border-radius: 4px;
  position: absolute;
  left: 16px;
}
/* The mode switch over the room: tool buttons joined edge to edge, the
   selected one filled. (The export panel's choices are segmented controls
   instead, styles.css; here the filled button is the look the room keeps.) */
#buildModeButton {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  border-right-width: 0;
}
#placementModeButton {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-left-width: 0;
}
#preferenceModeButton {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-left-width: 0;
}
#roomModeButtons .selectedTool {
  background: var(--strong);
  padding: 12px 16px;
  border-width: 0;
  color: var(--onStrong);
  cursor: default;
}
#roomModeButtons .unselectedTool {
  background: none;
}
/* Step and mode visibility (see styles.css): the mode switch shows in the
   seating step, and while setting preferences from the guest step; the
   preference button only in preference mode, where it sits to the right of
   the seating button, which then loses its rounded corner. */
#roomModeButtons,
#placementModeButton,
#preferenceModeButton {
  display: none;
}
.placementStep #roomModeButtons,
.preferenceMode:not(.buildStep) #roomModeButtons {
  display: flex;
}
.placementStep #placementModeButton {
  display: flex;
}
.preferenceMode:not(.buildStep) #preferenceModeButton {
  display: flex;
}
.preferenceMode #placementModeButton {
  border-radius: 0;
}

.preferenceMode .tableContent {
  border-color: var(--grey) !important;
}

.chairIsChair.preferenceHighlightedChair {
  opacity: 1 !important;
}
.chairIsChair.preferenceNotHighlightedChair {
  opacity: 0.4 !important;
}

.preferenceMode .noChair {
  display: none;
}

.blurry {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hideCursor {
  cursor: none !important;
}
.isGrabbing {
  cursor: grabbing !important;
}
#customCursor {
  width: 24px;
  height: 24px;
  position: absolute;
  left: var(--mouse-x);
  top: var(--mouse-y);
  transform: translate(-50%, -50%) rotate(var(--mouse-rotation));
  z-index: 999;
  pointer-events: none;
}
.cursorVariant,
.cursorIcon {
  width: 100%;
  height: 100%;
}
.cursorIcon {
  display: block;
}
/* A dark shape with a light outline, so it reads over both the light room and
   dark tables and chairs. */
.cursorIcon {
  color: #000;
}
.cursorHalo {
  fill: #fffc;
  stroke: #fffc;
}
.cursorShape {
  fill: currentColor;
  stroke: currentColor;
}

#roomSettings {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#settingsContainer {
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  background: var(--panel);
  color: var(--textFaint);
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0px 4px 16px 2px #0001;
  pointer-events: all;
}
/* On a short window the panel stops growing and scrolls, ending where the
   preferences panel does: 16px under the header at the top (where this one
   starts) and 53px above the bottom edge (the room tabs). */
#settingsContainer .innerContainer {
  max-height: calc(100vh - var(--headerHeight) - 16px - 53px);
}
