* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #1a1a1a;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overscroll-behavior: none;
}

#frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1080 / 2280;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
  touch-action: manipulation;
}
@media (min-height: 700px) and (min-width: 500px) {
  #frame { margin-top: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.5); border-radius: 28px; }
}

#screen { position: absolute; inset: 0; }
#screen img { width: 100%; height: 100%; display: block; object-fit: cover; -webkit-user-drag: none; user-select: none; }

.hotspot {
  position: absolute;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(237,28,36,.25);
}
body.debug .hotspot { background: rgba(237,28,36,.25); outline: 1px dashed #ed1c24; }

#fallback {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: #f4f4f4;
  overflow-y: auto;
}
#fallback.show { display: flex; }
#fallback .fb-header {
  background: #ed1c24; color: #fff; padding: 18px 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 17px; font-weight: 600;
  flex: 0 0 auto;
}
#fallback .fb-header button {
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1;
}
#fallback .fb-body { padding: 12px; overflow-y: auto; }
#fallback .fb-note {
  background: #fff3cd; color: #7a5b00; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; margin-bottom: 12px;
}
#fallback .fb-item {
  background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 8px;
  font-size: 15px; color: #222; cursor: pointer; border: 1px solid #eee;
}
#fallback .fb-item:active { background: #fbeaea; }
#fallback .fb-item.disabled { color: #999; cursor: default; }

#hint {
  position: fixed; left: 0; right: 0; bottom: 0;
  text-align: center; font-size: 11px; color: #aaa;
  padding: 6px; background: #111;
}
