/* style.css */
:root {
  --bg-color: #ffffff; 
  --surface-color: #ffffff;
  --primary-color: #3b82f6;
  --text-color: #111827;
  
  --input-height: 80px; /* 데스크톱/모바일 호환을 위해 살짝 조정 */
  --btn-height: 90px;
  --row-gap: 24px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 공통 입력창 스타일 */
.input-row {
  margin-bottom: var(--row-gap);
  display: flex;
  flex-direction: column;
}

.input-label {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #374151;
}

.form-input, .form-select {
  width: 100%;
  height: var(--input-height);
  font-size: 1.25rem;
  padding: 0 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background-color: #f9fafb;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 공통 버튼 스타일 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--btn-height);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: transform 0.1s, opacity 0.2s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: #e5e7eb; color: #374151; }
.btn-danger { background-color: #ef4444; color: white; }


/* QR page visual hotfix */
.form-input::placeholder {
  font-size: 1.05rem;
  color: #94a3b8;
}

.brand-plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  isolation: isolate;
  background: transparent;
  box-shadow: none;
}
.brand-plate::before,
.brand-plate::after {
  content: none;
}
.brand-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
  border-radius: inherit;
  filter: drop-shadow(0 10px 16px rgba(15,23,42,0.10));
}




#qrcode-container {
  position: relative;
  overflow: hidden;
}
#qrcode-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 16%, transparent 84%, rgba(15,23,42,0.03));
  pointer-events: none;
}
#qrcode-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62), inset 0 -22px 28px rgba(148,163,184,0.08);
  pointer-events: none;
}
#qrcode {
  position: relative;
  background: #ffffff !important;
  color: #000000 !important;
  isolation: isolate;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12) !important;
}

@media (max-width: 480px) {
  .form-input::placeholder {
    font-size: 0.94rem;
  }
  .brand-plate-lg {
    width: 7.25rem;
    height: 7.25rem;
  }
}

/* QR reliability / dark-mode / landscape hotfix */
html, body {
  color-scheme: only light;
}

#qrcode-container,
#qrcode-container *,
#qrcode,
#qrcode *,
.qr-frame,
.qr-frame * {
  color-scheme: only light !important;
  forced-color-adjust: none !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.qr-frame {
  width: fit-content;
  max-width: min(100%, calc(100vw - 3rem));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  overflow: visible !important;
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #94a3b8 !important;
  padding: clamp(14px, 3vw, 24px) !important;
}

.qr-frame canvas,
.qr-frame img {
  display: block !important;
  width: min(var(--qr-size, 280px), calc(100vw - 6rem)) !important;
  height: auto !important;
  max-width: 100% !important;
  background: #ffffff !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  color-scheme: only light !important;
  forced-color-adjust: none !important;
  image-rendering: pixelated;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255,255,255,0.86) 0, rgba(255,255,255,0.28) 20%, transparent 42%),
      linear-gradient(145deg, #eef2f7 0%, #d9e0e8 52%, #b7c0cc 100%) !important;
    color: #0f172a !important;
  }
  .warm-shell,
  .warm-card,
  .menu-day-card,
  #menu-modal > div,
  #ios-install-modal > div {
    background-color: rgba(255,255,255,0.92) !important;
    color: #0f172a !important;
  }
  input, select, textarea {
    background-color: #f8fafc !important;
    color: #0f172a !important;
  }
  .qr-frame {
    background: #ffffff !important;
  }
}

@media (orientation: landscape) and (max-height: 640px) {
  body .warm-shell > header {
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
  }
  body .warm-shell > header .brand-plate-lg {
    width: 4.75rem !important;
    height: 4.75rem !important;
    margin-bottom: 0.45rem !important;
  }
  body .warm-shell > header h1 {
    font-size: 2.15rem !important;
    line-height: 1.05 !important;
  }
  body main {
    justify-content: flex-start !important;
    padding-bottom: 0.75rem !important;
  }
  #qrcode-container {
    max-width: min(26rem, calc(100vw - 2rem)) !important;
    padding: 0.9rem !important;
    margin-top: 0 !important;
  }
  #qrcode {
    margin-bottom: 0.75rem !important;
  }
  #qrcode-container h2 {
    font-size: 1.45rem !important;
    margin-bottom: 0.25rem !important;
  }
  #qrcode-container p {
    font-size: 0.95rem !important;
    margin-bottom: 0.75rem !important;
  }
  #btn-reissue-qr,
  #btn-back-to-form {
    height: 2.75rem !important;
    font-size: 0.95rem !important;
  }
}


/* Permanent QR was removed for abuse-risk mitigation. Keep QR rendering in light mode even on forced dark browsers. */
#qrcode[data-lunchcheck-qr="true"] {
  background-color: #ffffff !important;
  color: #000000 !important;
  color-scheme: only light !important;
  forced-color-adjust: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
#qrcode[data-lunchcheck-qr="true"] * {
  color-scheme: only light !important;
  forced-color-adjust: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
#qrcode[data-lunchcheck-qr="true"] canvas,
#qrcode[data-lunchcheck-qr="true"] img,
#qrcode[data-lunchcheck-qr="true"] table {
  background-color: #ffffff !important;
}
