/* Tycoon Kids World — parent log in, approval and PIN screens (shared/account.js)
   Same look as the sales page and the game: Fredoka, parchment, brown borders, green buttons. */
@font-face { font-family: 'Fredoka'; src: url('../assets/fonts/fredoka-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../assets/fonts/fredoka-600.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }

#acct {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; overflow-y: auto;
  background: radial-gradient(circle at 30% 20%, #4f8a3c 0, #2d5a2a 60%, #1f3d1d 100%);
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  font: 500 17px/1.45 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #3a2a22;
}
.acct-card {
  width: 100%; max-width: 420px; margin: auto;
  background: #f6efe1; border: 4px solid #5a3d2b; border-radius: 22px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .25); padding: 22px 22px 18px; text-align: center;
}
.acct-card.wide { max-width: 460px; }
.acct-logo { width: 56px; height: 56px; image-rendering: pixelated; display: block; margin: -4px auto 4px; }
.acct-card h1 { font: 600 26px/1.2 'Fredoka', system-ui, sans-serif; margin: 0 0 6px; color: #3a2a22; }
.acct-sub { margin: 0 0 14px; color: #7a5a44; font-size: 16px; }
.acct-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.acct-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; color: #5a3d2b; }
.acct-form label small { font-weight: 500; color: #7a5a44; }
.acct-form input[type=email], .acct-form input[type=password], .acct-form input[type=text], .acct-form select {
  font: 500 18px 'Fredoka', system-ui, sans-serif; padding: 10px 12px; border: 3px solid #5a3d2b; border-radius: 12px;
  background: #fffaf0; color: #3a2a22; width: 100%; min-height: 48px;
}
.acct-form input:focus, .acct-form select:focus { outline: 3px solid #f0b428; outline-offset: 1px; }
.acct-check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; line-height: 1.35; }
.acct-check input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: #3d7a2a; }
.acct-check a, .acct-links a, .acct-switch a { color: #2f6fa1; font-weight: 600; }
.acct-btn {
  font: 600 19px 'Fredoka', system-ui, sans-serif; min-height: 52px; padding: 8px 18px; width: 100%;
  background: #6cbf4a; color: #fff; border: 3px solid #3d7a2a; border-radius: 14px; box-shadow: 0 4px 0 #3d7a2a; cursor: pointer;
}
.acct-btn:active { transform: translateY(3px); box-shadow: none; }
.acct-btn:disabled { opacity: .7; cursor: wait; }
.acct-btn.ghost { background: #fffaf0; color: #5a3d2b; border-color: #5a3d2b; box-shadow: 0 4px 0 #5a3d2b; }
.acct-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px;
  font: 600 18px 'Fredoka', system-ui, sans-serif; color: #3a2a22; background: #fff; cursor: pointer;
  border: 3px solid #5a3d2b; border-radius: 14px; box-shadow: 0 4px 0 #5a3d2b;
}
.acct-google svg { width: 24px; height: 24px; }
.acct-google:active { transform: translateY(3px); box-shadow: none; }
.acct-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: #7a5a44; font-size: 14px; }
.acct-or::before, .acct-or::after { content: ''; flex: 1; border-top: 2px dashed #c9b28f; }
.acct-msg { margin: 0; min-height: 0; color: #b23a2a; font-weight: 600; font-size: 15px; }
.acct-msg:empty { display: none; }
.acct-msg.good { color: #3d7a2a; }
.acct-links { margin: 12px 0 0; font-size: 15px; }
.acct-switch { margin: 14px 0 0; padding-top: 12px; border-top: 2px dashed #c9b28f; font-size: 15px; color: #7a5a44; }
.acct-wait { color: #5a3d2b; font-weight: 600; }
.acct-spin { display: inline-block; width: 16px; height: 16px; border: 3px solid #c9b28f; border-top-color: #3d7a2a; border-radius: 50%; animation: acct-spin 1s linear infinite; vertical-align: -2px; }
@keyframes acct-spin { to { transform: rotate(360deg); } }

/* the PIN pad */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 12px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #5a3d2b; background: #fffaf0; }
.pin-dots i.on { background: #5a3d2b; }
.pin-dots.shake { animation: acct-shake .35s; }
@keyframes acct-shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; margin-top: 8px; }
.pin-pad button {
  height: 58px; font: 600 26px 'Fredoka', system-ui, sans-serif; color: #3a2a22; cursor: pointer;
  background: #fffaf0; border: 3px solid #5a3d2b; border-radius: 14px; box-shadow: 0 4px 0 #5a3d2b;
}
.pin-pad button:active { transform: translateY(3px); box-shadow: none; }
.pin-pad button:disabled { opacity: .4; }

/* short screens (phones held sideways): smaller pad */
@media (max-height: 520px) {
  .acct-card { padding: 14px 18px 12px; }
  .acct-logo { display: none; }
  .acct-card h1 { font-size: 22px; }
  .acct-sub { margin-bottom: 8px; font-size: 15px; }
  .pin-dots { margin: 2px 0 6px; }
  .pin-pad { grid-template-columns: repeat(3, 64px); gap: 6px; }
  .pin-pad button { height: 44px; font-size: 22px; }
}
.acct-code { margin-top: 12px; padding-top: 12px; border-top: 2px dashed #c9b28f; }
.acct-code input { text-transform: uppercase; letter-spacing: .08em; }
