/* UGC Toybox sign-in (/toybox/login/). Standalone page: the app's tokens are repeated here on purpose
   (the login page loads nothing from the gated app). Paper, ink, hard shadows, toy colors. */
:root {
  color-scheme: dark;
  --paper: #1B1916; --card: #25221E; --cream: #463C26; --raised: #2E2A25; --ink: #0C0B0A; --tx: #EDE6D6; --ink-2: #D6CEBD; --ink-3: #B7AE9C; --rule: #4F483E;
  --blue: #6C8CF5; --yellow: #F2C451; --coral: #EE7258; --coral-t: #452F27; --mint: #6FC7A2; --mint-t: #313C33;
  --good: #6FC7A2; --bad: #F28B73; --edge: rgba(255, 255, 255, .06);
  --deck-b: #3F5299; --deck-y: #A98530;
  --f-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #F2EFE6; --card: #FFFDF7; --cream: #FFF3D6; --raised: #FFFDF7; --ink: #1B1B1F; --tx: #1B1B1F; --ink-2: #3A3833; --ink-3: #55524A; --rule: #C9C3B4;
  --blue: #2F5BEA; --yellow: #F6C343; --coral: #E8553A; --coral-t: #FBE0D9; --mint: #7FD1AE; --mint-t: #DDF3E9;
  --good: #16794F; --bad: #B8321C; --edge: transparent;
  --deck-b: #2F5BEA; --deck-y: #F6C343;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper); color: var(--tx); font: 500 16px/1.5 var(--f-body);
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
h1, p { margin: 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 64px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.wm { font: 800 26px/1 var(--f-display); letter-spacing: -0.02em; }
.home { color: var(--tx); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.home:hover { color: var(--blue); }
.home:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.stack { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 40px; }

/* two card backs peeking out behind the form */
.deck { position: relative; width: 100%; max-width: 460px; height: 0; }
.deck i { position: absolute; left: 50%; top: 0; width: 430px; height: 340px; margin-left: -215px; border: 3px solid var(--ink); border-radius: 28px; }
.deck i:nth-child(1) { background: var(--deck-b); transform: translate(34px, -6px) rotate(6deg); }
.deck i:nth-child(2) { background: var(--deck-y); transform: translate(-30px, 12px) rotate(-5deg); }

.card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 34px 32px 26px;
  background: var(--card); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 8px 0 var(--ink), inset 0 1px 0 var(--edge);
  display: flex; flex-direction: column; gap: 0;
}
.sticker {
  position: absolute; top: -18px; right: 24px; transform: rotate(5deg);
  display: inline-flex; align-items: center; padding: 5px 14px; background: var(--mint); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink);
  font: 700 14px/1.1 var(--f-body); color: var(--ink); transition: background-color 200ms ease;
}
.sticker b { font-weight: 700; }
.sticker:has(.bad) { background: var(--coral-t); color: var(--tx); }
.card.locked .sticker { background: var(--paper); color: var(--tx); }
h1 { font: 800 38px/1.02 var(--f-display); letter-spacing: -0.02em; }
.sub { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.label { display: block; margin-top: 24px; font-size: 16px; font-weight: 700; }
.row { position: relative; margin-top: 8px; }
input {
  width: 100%; height: 58px; padding: 0 88px 0 22px;
  background: var(--paper); color: var(--tx); border: 3px solid var(--ink); border-radius: 999px;
  font: 700 20px/1 var(--f-body); letter-spacing: .06em; caret-color: var(--blue);
  transition: background-color 120ms ease, border-color 120ms ease;
}
input:focus { outline: 3px solid var(--blue); outline-offset: 3px; background: var(--card); }
.denied input { border-color: var(--bad); background: var(--coral-t); }
.peek {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 14px;
  background: var(--card); color: var(--tx); border: 2.5px solid var(--ink); border-radius: 999px; font: 700 15px/1 var(--f-body); cursor: pointer;
}
.peek:hover { background: var(--raised); }
.peek:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.go {
  margin-top: 16px; min-height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 5px 0 var(--ink);
  font: 700 21px/1 var(--f-display); letter-spacing: -0.01em; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease;
}
.go:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.go:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.go:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
button:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
.status { margin-top: 16px; min-height: 24px; font-size: 16px; line-height: 1.45; color: var(--ink-3); }
.status.bad { color: var(--bad); font-weight: 700; }
.status.ok { color: var(--good); font-weight: 700; }
.foot { margin-top: 36px; font-size: 15px; color: var(--ink-3); }

.shake { animation: shake 420ms var(--ease); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px) rotate(-.6deg); }
  30% { transform: translateX(7px) rotate(.5deg); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@media (max-width: 560px) {
  .top { padding: 20px 16px 0; }
  .wm { font-size: 22px; }
  .stack { justify-content: flex-start; padding-top: 40px; overflow-x: clip; } /* rotated deck poked 4px past the viewport */
  .deck i { left: 0; margin-left: 0; width: 100%; height: 300px; }
  .deck i:nth-child(1) { transform: translate(10px, -6px) rotate(4deg); }
  .deck i:nth-child(2) { transform: translate(-8px, 10px) rotate(-3deg); }
  .card { padding: 30px 20px 22px; border-radius: 24px; }
  h1 { font-size: 32px; }
  .sub { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
