@media only screen and (max-width: 600px) { html {zoom: 0.7;} }
@media only screen and (max-width: 380px) { html {zoom: 0.6;} }

html {
  font-family: Courier New;
  display: inline-block;
  text-align: center;
  scroll-behavior: smooth;
}

h1 {
  font-size: 1.8rem;
  color: white;
}

h2 {
  font-size: 1.4rem;
}

p {
  font-size: 1.0rem;
}

.topnav {
  overflow: hidden;
  background-color: #cc3332;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: #e5e5e5;
}

.content {
  padding-left: 5%;
  padding-right: 5%;
  padding-top: 15px;
}

.card-grid {
  max-width: 800px;
  min-width: 500px;
  margin: 0 auto;
  display: grid;
  grid-gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background-color: white;
  box-shadow: 2px 2px 12px 1px rgba(140,140,140,.5);
  padding-bottom: 10px;
}

form {
  width: 80%;
  margin: auto;
  font-weight: bold;
}

input[type="text"] {
  font-family: Courier New;
  flex:1;
  padding:10px 12px;
  font-size:1.2rem;
  border-radius:8px;
  border:1px solid #111;
  outline:none;
  transition: border 0.2s, box-shadow 0.2s;
  width: 80%;
}

input[type="text"]:focus {
  border:1px solid #cc3332;
  box-shadow:0 0 6px #cc3332;
}

label {
  font-size: 1.2rem;
}

.fade-in-text {
  animation: fadeIn 1s;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

button {
  font-family: Courier New;
  font-weight: bold;
  border: none;
  color: black;
  background-color: white;
  padding: 10px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  width: 60%;
  margin: 5px;
  border-radius: 4px;
  border: 2px solid #cc3332;
  transition-duration: 0.2s;
}

button:disabled {
  background:#bbb;
  cursor:not-allowed;
}

button:active:enabled {
  background:#cc3332;
  transform: scale(0.8);
}

.rescan {
  border: none;
  color: white;
  background-color: #cc3332;
  transition-duration: 0.2s;
}

button.rescan:hover:enabled{
  background-color: #872222;
  cursor: pointer;
}

hr {
  border: 1.5px solid #e5e5e5;
  width: 95%;
  margin: 20px;
}

table {
  margin: auto;
}

th {
  padding: 4px;
  font-weight: bold;
}

small { color:#666; display:block; margin-top:6px; }

#qrcode {
  margin-top:16px;
  display:grid;
  place-items:center;
  min-height:280px;
  border:1px dashed #eee;
  border-radius:10px;
  padding:4px;
  background:#FFF;
}

.muted { color:#7a7a7a; }
.bad { color: #b02020; font-weight:600; }
.good { color: #555; font-weight:600; }


@keyframes qrPop {
  0%   { transform: scale(0.85); opacity: 0; filter: drop-shadow(0 0 0 rgba(204,51,50,0)); }
  60%  { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 6px 10px rgba(204,51,50,0.15)); }
  100% { transform: scale(1.00); opacity: 1; filter: drop-shadow(0 3px 6px rgba(204,51,50,0.10)); }
}

#qrcode.pop, #qrcode .qr-pop {
  animation: qrPop 260ms cubic-bezier(.2,.8,.2,1) both;
  transform-origin: center center;
}
@media (prefers-reduced-motion: reduce) {
  #qrcode.pop, #qrcode .qr-pop { animation: none; }
}

#scan_me{ display: none; }

:root { --vh: 1vh; }

.qr-wrap {
  display: grid;
  place-items: center;
  margin: 8px auto 14px;
}

.qr-box {
  width: min(95%, calc(var(--vh) * 90), 790px);
  height: min(95%, calc(var(--vh) * 90), 790px);
  display: grid;
  place-items: center;
}

.qr-box #qrcode {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#qrcode canvas,
#qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}