:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ece2d6;
  color: #211a16;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  background: #ece2d6;
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  width: min(100vw, 56.25vh);
  min-height: 100vh;
}

.page-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 1920;
  overflow: hidden;
  background: #eee0d1 url("../projects/flash-event/assets/bg.png") 0 0 / 100% auto no-repeat;
}

.page-layer,
.decorative-image,
.hotspot,
.field,
.user-id,
.qr-code {
  position: absolute;
}

.page-layer,
.decorative-image {
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.hotspot {
  z-index: 20;
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hotspot:focus-visible,
.field:focus-visible {
  outline: 3px solid rgba(35, 115, 180, 0.78);
  outline-offset: 2px;
}

.hotspot:disabled {
  cursor: default;
}

.image-action img {
  display: block;
  width: 100%;
  height: auto;
}

[data-element-id="agree-checkbox-bg"] {
  z-index: 10;
}

.field {
  z-index: 30;
  border: 0;
  border-radius: 0;
  padding: 0 2%;
  background: transparent;
  color: #2a201b;
  font-size: clamp(16px, 5vw, 28px);
  line-height: 1;
  outline: none;
}

.field[type="password"] {
  letter-spacing: 0;
}

.field::placeholder {
  color: rgba(42, 32, 27, 0.55);
}

.user-id {
  z-index: 25;
  left: 23%;
  top: 72.5%;
  width: 54%;
  text-align: center;
  font-size: clamp(10px, 2.6vw, 15px);
  font-weight: 700;
  line-height: 1.15;
  color: #2a201b;
  overflow-wrap: anywhere;
}

.qr-code {
  z-index: 25;
  left: 35.5%;
  top: 49.3%;
  width: 29%;
  height: auto;
  aspect-ratio: 1;
  background: #fff;
}

.qr-code canvas,
.qr-code img {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-code-unavailable {
  border: 6px solid #111;
}

.app-status {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(88vw, 420px);
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(28, 24, 20, 0.9);
  color: #fff;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
}

.app-status[data-error="true"] {
  background: rgba(136, 36, 28, 0.94);
}

.debug-token {
  position: fixed;
  z-index: 120;
  left: 12px;
  right: 12px;
  bottom: max(78px, calc(env(safe-area-inset-bottom) + 78px));
  max-height: 34vh;
  overflow: auto;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #211a16;
  box-shadow: 0 8px 30px rgba(35, 24, 16, 0.22);
  font-size: 12px;
  line-height: 1.4;
}

.debug-token strong,
.debug-token code {
  display: block;
}

.debug-token code {
  margin-top: 6px;
  overflow-wrap: anywhere;
  user-select: all;
}
