* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #f2efe8;
  color: #1f2933;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  display: flex;
  justify-content: center;
}

.page-shell {
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 45px rgb(31 41 51 / 16%);
}

.layer,
.dynamic-image {
  position: absolute;
  display: block;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.base-layer {
  left: 0;
  top: 0;
}

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

.hotspot:focus-visible,
.data-input:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.hotspot:disabled {
  cursor: not-allowed;
}

.hotspot:disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(255 255 255 / 18%);
}

.app-owned-hotspot {
  z-index: 18;
}

.data-input {
  position: absolute;
  z-index: 22;
  resize: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgb(255 255 255 / 72%);
  color: #1f2933;
  font: 500 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.data-input[readonly] {
  background: transparent;
  text-align: center;
}

.mock-qr {
  position: absolute;
  z-index: 12;
  background:
    linear-gradient(90deg, #111 10%, transparent 10% 20%, #111 20% 30%, transparent 30% 40%, #111 40% 50%, transparent 50% 60%, #111 60% 70%, transparent 70% 80%, #111 80% 90%, transparent 90%),
    linear-gradient(#111 10%, transparent 10% 20%, #111 20% 30%, transparent 30% 40%, #111 40% 50%, transparent 50% 60%, #111 60% 70%, transparent 70% 80%, #111 80% 90%, transparent 90%),
    #fff;
  background-size: 30px 30px;
  border: 12px solid #fff;
  box-shadow: 0 2px 10px rgb(31 41 51 / 18%);
}

.status-pill {
  position: absolute;
  z-index: 24;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 82%);
  color: #334155;
  font-size: 12px;
}

.todo-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  max-height: 34vh;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #cbd5e1;
  background: rgb(255 255 255 / 94%);
  color: #111827;
  padding: 10px;
  font-size: 12px;
}

.app-status {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  border: 1px solid #0f766e;
  background: rgb(240 253 250 / 96%);
  color: #115e59;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgb(15 23 42 / 14%);
}

.app-status-error {
  border-color: #dc2626;
  background: rgb(254 242 242 / 96%);
  color: #991b1b;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .page-shell {
    box-shadow: none;
  }
}
