/* ========================================
   PWA QR GPS — style.css
   モバイルファースト・シンプル・高コントラスト
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Header ---- */
header {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
}

header h1 {
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---- Main ---- */
main {
  width: 100%;
  max-width: 440px;
  padding: 12px 16px;
  flex: 1;
}

/* ---- Button ---- */
#getLocationBtn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #1a73e8;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

#getLocationBtn:hover {
  background: #1565c0;
}

#getLocationBtn:active {
  transform: scale(0.97);
}

#getLocationBtn:disabled {
  background: #90caf9;
  cursor: not-allowed;
}

/* ---- Status ---- */
.status {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.status.info {
  background: #e3f2fd;
  color: #1565c0;
}

.status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.error {
  background: #fce4ec;
  color: #c62828;
}

/* ---- Result Section ---- */
#resultSection {
  margin-top: 12px;
}

/* JSON */
#jsonOutput {
  background: #263238;
  color: #80cbc4;
  padding: 10px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 12px;
  margin-bottom: 0;
}

/* QR Code */
#qrcode {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#qrcode img,
#qrcode canvas {
  max-width: 100%;
  height: auto !important;
}



/* ---- Utility ---- */
.hidden {
  display: none !important;
}

/* ---- iOS Safe Area ---- */
@supports (padding-top: env(safe-area-inset-top)) {
  header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
}
