*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  background: #0a0a0a;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.head {
  width: 100%;
  text-align: center;
  flex: 0 0 auto;
}

.logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 8px auto;
  border: 0;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: bold;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.sub {
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 20px;
  color: #8a8a8a;
}

.rule {
  width: 58%;
  max-width: 220px;
  height: 2px;
  margin: 16px auto 20px auto;
  background: #00e0b8;
}

.view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.view[hidden] { display: none !important; }

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-top: 4px;
}

input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #161616;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  letter-spacing: 0.3em;
  text-align: center;
  outline: none;
}

input[type="password"]:focus {
  border-color: #00e0b8;
}

.actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 18px 16px;
  border-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 22px;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-primary {
  background: #102824;
  border: 1px solid #1a4a42;
  border-left: 4px solid #00e0b8;
}

.btn-start {
  background: #102418;
  border: 1px solid #1a3d28;
  border-left: 4px solid #3d9a5f;
}

.btn-end {
  background: #241010;
  border: 1px solid #3d1a1a;
  border-left: 4px solid #c04a4a;
}

.btn-primary:hover, .btn-start:hover, .btn-end:hover {
  filter: brightness(1.12);
}

.quiet {
  appearance: none;
  -webkit-appearance: none;
  margin: 8px auto 0 auto;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.quiet:hover { color: #c8c8c8; }

.msg {
  min-height: 24px;
  margin: 4px 0 0 0;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  color: #c8c8c8;
}

.msg.ok { color: #00e0b8; }
.msg.err { color: #e6a0a0; }

@media (max-height: 700px) {
  .logo { width: 60px; height: 60px; }
  h1 { font-size: 24px; line-height: 30px; }
  .rule { margin: 12px auto 14px auto; }
  .btn { padding: 15px 14px; }
  .page { padding-top: 10px; padding-bottom: 10px; }
}

.wait {
  margin: 4px 0 0 0;
  font-size: 28px;
  line-height: 32px;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #00e0b8;
  text-align: center;
}
.wait[hidden], .wait-note[hidden] { display: none !important; }
.wait-note {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #8a8a8a;
  text-align: center;
}
