:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: #171717; background: #f4f4f4; --yellow: #ffdf00; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
button, input { font: inherit; }
.header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: max(28px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) 24px max(40px, env(safe-area-inset-left)); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-size: 19px; letter-spacing: -.6px; white-space: nowrap; }
.brand strong { font-weight: 750; }
.brand-mark { display: grid; place-items: center; background: var(--yellow); width: 40px; height: 40px; border-radius: 11px; font-weight: 850; font-size: 23px; padding-bottom: 3px; }
.header-label { font-size: 12px; font-weight: 650; letter-spacing: 1.6px; color: #626262; }
main { flex: 1; display: grid; place-items: center; padding: 36px 24px 44px; }
.generator { width: min(100%, 496px); }
.intro { margin-bottom: 30px; }
h1 { font-size: clamp(2.7rem, 7vw, 3.75rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 780; margin: 0; }
.period { color: #a28d00; }
.code-card { background: #fff; border: 1px solid #e1e1e1; border-radius: 22px; padding: 27px; box-shadow: 0 5px 0 #e8e8e8, 0 18px 40px -28px #0003; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: 1.35px; color: #525252; }
.digit-count { letter-spacing: .6px; color: #797979; font-size: 12px; font-weight: 550; }
.digits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 22px 0 25px; user-select: text; }
.digits span { display: grid; place-items: center; aspect-ratio: .77; min-height: 64px; border-radius: 10px; border: 1px solid #e6e6e6; background: #f6f6f6; font-size: clamp(2rem, 7vw, 2.9rem); font-weight: 680; font-variant-numeric: tabular-nums; line-height: 1; box-shadow: inset 0 -3px 0 #00000005; }
.button { width: 100%; min-height: 56px; border: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-size: 16px; font-weight: 650; transition: background .15s, transform .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.button svg { width: 21px; height: 21px; flex: 0 0 auto; }
.button-copy { background: var(--yellow); color: #171717; }
.button-copy.copied { background: #171717; color: #ffdf00; }
.button-generate { background: #fff; color: #3d3d3d; margin-top: 9px; min-height: 50px; }
@media (hover: hover) { .button-copy:hover { background: #f1d300; } .button-copy.copied:hover { background: #303030; } .button-generate:hover { background: #f4f4f4; } }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid #1465b3; outline-offset: 4px; }
.status { min-height: 1.5em; color: #6c6c6c; font-size: 14px; line-height: 1.5; margin: 12px 0 0; text-align: center; }
.privacy { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 23px 0 0; font-size: 14px; color: #656565; line-height: 1.5; }
.privacy svg { width: 17px; height: 17px; flex: 0 0 auto; }
footer { display: flex; justify-content: space-between; gap: 18px; padding: 20px 40px max(24px, env(safe-area-inset-bottom)); border-top: 1px solid #e3e3e3; font-size: 12px; color: #737373; line-height: 1.6; }
.manual-code { width: 100%; text-align: center; font-size: 24px; padding: 12px; margin-bottom: 18px; border: 1px solid #777; border-radius: 8px; }
.manual-code[hidden] { display: none; }
.error { font-size: 16px; color: #a52820; }
@media (max-width: 600px) {
  .header { padding: max(20px, env(safe-area-inset-top)) 24px 14px; }
  .header-label { display: none; }
  main { padding: 16px 24px 20px; }
  .intro { margin-bottom: 24px; }
  h1 { font-size: 2.8rem; }
  .code-card { padding: 22px 18px 18px; border-radius: 18px; }
  .digits { gap: 6px; margin: 20px 0 23px; }
  .digits span { font-size: clamp(1.75rem, 8vw, 2.6rem); border-radius: 8px; }
  .privacy { font-size: 13px; }
  footer { padding: 12px 24px max(14px, env(safe-area-inset-bottom)); flex-direction: column; gap: 3px; text-align: center; }
}
@media (max-width: 600px) and (max-height: 740px) {
  main { padding-top: 12px; padding-bottom: 16px; }
  h1 { font-size: 2.6rem; }
  .intro { margin-bottom: 20px; }
  .privacy { margin-top: 18px; }
}
@media (max-width: 350px) { main { padding-left: 16px; padding-right: 16px; } .header { padding-left: 16px; padding-right: 16px; } h1 { font-size: 2.45rem; } .card-heading { font-size: 11px; letter-spacing: .8px; } .digits { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; color: #f5f5f5; background: #141414; }
  .brand-mark { color: #171717; }
  .header-label { color: #aaa; }
  .period { color: var(--yellow); }
  .code-card { background: #202020; border-color: #383838; box-shadow: 0 5px 0 #0b0b0b, 0 18px 40px -28px #0009; }
  .card-heading { color: #bebebe; }
  .digit-count { color: #999; }
  .digits span { background: #2b2b2b; border-color: #3b3b3b; box-shadow: inset 0 -3px 0 #0002; }
  .button-generate { background: #202020; color: #e0e0e0; }
  .button-copy.copied { background: #333; color: var(--yellow); }
  .status, .privacy { color: #aaa; }
  footer { color: #999; border-color: #303030; }
  .manual-code { background: #2b2b2b; color: #fff; border-color: #888; }
  .error { color: #ff9b93; }
  :focus-visible { outline-color: #7abcff; }
  @media (hover: hover) { .button-generate:hover { background: #2d2d2d; } .button-copy.copied:hover { background: #444; } }
}
