.case-detail-page {
  background: #dad8d4;
}

.case-artboard {
  position: relative;
  width: min(100%, 1920px);
  aspect-ratio: 1920 / 32404;
  margin: 0 auto;
  background: #dad8d4;
}

.echoscrip-artboard {
  aspect-ratio: auto;
}

.echoscrip-artboard-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.is-case-zoomed .case-artboard {
  width: max(100%, 1920px);
}

.case-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.case-tools {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.case-tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #18181b;
  cursor: pointer;
}

.case-tool img {
  width: 22px;
  height: 22px;
}

.case-tool:hover,
.case-tool[aria-pressed="true"] {
  background: #e9e9e9;
}

.case-tool:focus-visible {
  outline: 2px solid var(--selection);
  outline-offset: 1px;
}

.case-tool-tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  width: max-content;
  padding: 8px 10px;
  border-radius: 6px;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 150ms ease;
}

.case-tool:last-child .case-tool-tip {
  right: 0;
  left: auto;
  transform: none;
}

.case-tool:focus-visible .case-tool-tip {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) {
  .case-tool:hover .case-tool-tip {
    opacity: 1;
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.case-detail-page) {
    scroll-behavior: auto;
  }

  .case-tool-tip {
    transition: none;
  }
}
