:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #181818;
  background: #f6f6f6;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; }
main {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 64px max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; margin-bottom: 28px; }
.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-weight: 650;
}
.card {
  padding: 32px;
  border: 1px solid #e4e4e4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(0 0 0 / 4%);
}
h1 { margin: 0 0 28px; font-size: clamp(24px, 6vw, 28px); line-height: 1.2; letter-spacing: -.6px; }
h2 { margin: 0 0 12px; font-size: clamp(20px, 5vw, 22px); line-height: 1.3; letter-spacing: -.3px; }
section p { color: #666; font-size: 14px; line-height: 1.6; }
label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
input {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #fff;
  color: #181818;
  font: inherit;
  font-size: 16px;
  line-height: 22px;
}
input::placeholder { color: #888; }
input:focus-visible, button:focus-visible { outline: 2px solid #777; outline-offset: 3px; }
input:focus { border-color: #555; }
button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 16px 0 0;
  padding: 10px 40px;
  border: 1px solid #111;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s ease;
}
@media (hover: hover) {
  button:hover:not(:disabled) { background: #292929; }
}
button span { position: absolute; right: 16px; font-size: 18px; line-height: 1; }
button:disabled { background: #666; border-color: #666; cursor: wait; }
.number {
  padding: 20px 12px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  background: #f5f5f5;
  color: #111;
  text-align: center;
  font-size: clamp(44px, 12vw, 56px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: 2px;
  overflow-wrap: anywhere;
}
#countdown { text-align: center; font-size: 13px; }
#message {
  margin: 20px 0 0;
  padding: 12px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  background: #f5f5f5;
  color: #444;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#message:empty, [hidden] { display: none !important; }
@media (max-width: 500px) {
  main {
    padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .brand { margin-bottom: 24px; }
  .card { padding: 24px; border-radius: 16px; }
}
@media (max-width: 360px) {
  .card { padding: 20px; }
  button { padding-inline: 32px; }
  button span { right: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  main { padding-top: max(20px, env(safe-area-inset-top)); }
  .brand { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
