:root {
  color-scheme: dark;
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05070d;
}

.story-frame,
.viewer-stage {
  width: 100vw;
  height: 100vh;
}

.story-frame {
  display: block;
  border: 0;
  background: #111;
}

.viewer-stage {
  position: relative;
}

.story-blocker {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
}

.story-overlay {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: calc(100vw - 24px);
  padding: 8px;
  color: #fff;
  background: rgba(5, 7, 13, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.story-overlay strong,
.story-overlay span,
.story-overlay button {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.story-overlay span {
  max-width: min(42vw, 320px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  text-overflow: ellipsis;
}

.story-overlay button {
  min-height: 34px;
  color: #111827;
  background: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
}

.story-overlay button:hover {
  filter: brightness(0.94);
}

@media (max-width: 680px) {
  .story-overlay {
    left: 8px;
    right: 8px;
    top: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .story-overlay span {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}
