:root {
  --bg: #0b1220;
  --panel: #111827;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --btn: rgba(15, 23, 42, 0.82);
  --btn-border: rgba(148, 163, 184, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.kiosk {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.refresh-btn {
  appearance: none;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.refresh-btn:active {
  transform: rotate(-45deg);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand strong {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--muted);
  font-size: 0.85rem;
}

.lang-pills {
  display: flex;
  gap: 0.5rem;
}

.lang-pill {
  appearance: none;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-pill[aria-current="true"] {
  background: var(--accent);
  color: #0b1220;
  border-color: transparent;
}

.stage-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(56, 189, 248, 0.08), transparent 60%),
    var(--bg);
}

.stage {
  height: 100%;
  display: flex;
  width: 300%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.stage.is-dragging {
  transition: none;
}

.slide {
  width: calc(100% / 3);
  height: 100%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-frame {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.sheet-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.edge-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(72px, 12vw);
  z-index: 2;
}

.edge-zone.left { left: 0; }
.edge-zone.right { right: 0; }

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
  backdrop-filter: blur(6px);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.nav-btn.prev { left: 12px; }
.nav-btn.next { right: 12px; }

.hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.7rem 1rem 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.hint kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .nav-btn {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }
  .hint { font-size: 0.8rem; }
}
