/* Optional walkthrough alongside the game; no native bitmap/control is changed. */
.cheonnyeon-tutorial {
  --tutorial-top: max(54px, calc(env(safe-area-inset-top, 0px) + 48px));
  position: fixed;
  z-index: 55;
  left: max(8px, env(safe-area-inset-left, 0px));
  top: var(--tutorial-top);
  width: min(
    340px,
    calc(
      100vw - 16px - env(safe-area-inset-left, 0px) -
        env(safe-area-inset-right, 0px)
    )
  );
  max-height: calc(
    100dvh - var(--tutorial-top) - max(8px, env(safe-area-inset-bottom, 0px))
  );
  box-sizing: border-box;
  padding: 10px;
  overflow: auto;
  color: #eee0c1;
  background: #25231ced;
  border: 1px solid #9e8b63;
  font:
    13px/1.45 system-ui,
    sans-serif;
  text-align: left;
}
.cheonnyeon-tutorial[hidden] {
  display: none;
}
.cheonnyeon-tutorial-top,
.cheonnyeon-tutorial-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cheonnyeon-tutorial-top strong {
  flex: 1;
}
.cheonnyeon-tutorial p {
  margin: 8px 0;
}
.cheonnyeon-tutorial button {
  min-height: 44px;
  padding: 6px 10px;
  color: #f4e8cb;
  background: #3e392b;
  border: 1px solid #9b8960;
  font: inherit;
  touch-action: manipulation;
}
.cheonnyeon-tutorial > button {
  width: 100%;
}
.cheonnyeon-tutorial-controls {
  margin-top: 6px;
}
.cheonnyeon-tutorial-controls button {
  flex: 1;
}
.cheonnyeon-tutorial-status {
  color: #ffdb85;
}
@media (max-height: 420px) {
  .cheonnyeon-tutorial {
    width: min(
      315px,
      calc(
        100vw - 16px - env(safe-area-inset-left, 0px) -
          env(safe-area-inset-right, 0px)
      )
    );
    font-size: 12px;
  }
}
