:root {
  color-scheme: dark;
  background: #000;
  color: #ededed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.entry {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
}
#wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#gate {
  --stroke: linear-gradient(#858585, #858585);
  position: relative;
  width: min(26rem, 100%);
  min-height: 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 1rem clamp(1.25rem, 4vw, 2rem);
  background:
    var(--stroke) left 8px top 8px / 14px 1px,
    var(--stroke) left 8px top 8px / 1px 14px,
    var(--stroke) right 8px top 8px / 14px 1px,
    var(--stroke) right 8px top 8px / 1px 14px,
    var(--stroke) left 8px bottom 8px / 14px 1px,
    var(--stroke) left 8px bottom 8px / 1px 14px,
    var(--stroke) right 8px bottom 8px / 14px 1px,
    var(--stroke) right 8px bottom 8px / 1px 14px,
    #000;
  background-repeat: no-repeat;
}
#gate input, #gate button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}
#gate input {
  width: 100%;
  min-width: 0;
  padding: 0 0.75rem 0 0;
}
#gate input::placeholder { color: #adadad; opacity: 1; }
#gate input:focus-visible { outline: none; }
#gate:focus-within { --stroke: linear-gradient(#b9b9b9, #b9b9b9); }
#gate button {
  position: relative;
  padding: 0 0.25rem 0 1.125rem;
  cursor: pointer;
  font-weight: 500;
}
#gate button::before {
  position: absolute;
  content: "";
  left: 0;
  top: 25%;
  bottom: 25%;
  border-left: 1px solid #424242;
}
#gate button:hover { text-decoration: underline; text-underline-offset: 0.25em; }
#gate button:focus-visible { outline: 1px solid #ededed; outline-offset: 2px; }
#gate button:disabled { opacity: 0.6; cursor: wait; }
#error {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #000;
  color: #ededed;
  font-size: 0.875rem;
  text-align: center;
}
#error:empty { display: none; }
@media (forced-colors: active) {
  #gate { border: 1px solid CanvasText; }
  #gate input:focus-visible { outline: 1px solid Highlight; }
}
