:root {
  --sage: #b3b59f;
  --brown: #543e37;
  --gold: #c8a96a;
  --cream: #fbf8f2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--sage);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "Hiragino Mincho ProN", "Songti SC", serif;
}

body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 6px;
}

.langs button {
  font: inherit;
  font-size: 16px;
  color: var(--brown);
  background: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 44px;
}

.langs button[aria-pressed="true"] {
  background: var(--brown);
  color: #fff;
  border-color: var(--brown);
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  touch-action: pan-y;
}

.page {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  -webkit-user-drag: none;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: none;
  border-radius: 8px;
  background: rgba(84, 62, 55, 0.35);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  z-index: 1;
}

.arrow.prev { left: 4px; }
.arrow.next { right: 4px; }
.arrow:disabled { visibility: hidden; }

.dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 12px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.dots span.on { background: var(--brown); }

.notice {
  position: fixed;
  left: 50%;
  bottom: calc(48px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  background: var(--brown);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 2;
}

.notice[hidden] { display: none; }

.notice button {
  display: block;
  margin: 8px auto 0;
  font: inherit;
  color: var(--brown);
  background: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  min-height: 44px;
}
