:root {
  color-scheme: dark;
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  background: #050505;
  color: #ececec;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #050505; }
body { min-width: 320px; margin: 0; background: #050505; color: #ececec; }
.shell {
  width: min(520px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 24px 0 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(-4vh);
}
.shell.has-searched {
  width: min(900px, calc(100% - 40px));
  min-height: 0;
  padding-top: clamp(72px, 10vh, 96px);
  transform: none;
}
h1 {
  margin: 0 0 32px;
  color: #ececec;
  font-size: clamp(16px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: .045em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.search-row { display: flex; gap: 12px; }
input, button {
  height: 52px;
  border: 1px solid #565656;
  border-radius: 4px;
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  outline: none;
  background: #0d0d0d;
  color: #ececec;
}
input::placeholder { color: #777; opacity: 1; }
input:hover { border-color: #707070; }
input:focus { border-color: #bdbdbd; }
button {
  width: 150px;
  flex: 0 0 150px;
  padding: 0 18px;
  background: #e8e8e8;
  color: #111;
  cursor: pointer;
}
button:hover { background: #fff; }
button:focus-visible { outline: 2px solid #a0a0a0; outline-offset: 3px; }
button:active { background: #c8c8c8; }
button:disabled { cursor: wait; opacity: .65; }
.status {
  min-height: 24px;
  margin-top: 32px;
  color: #a0a0a0;
  font-size: 14px;
  line-height: 1.6;
}
.status:empty { display: none; }
.results {
  margin-top: 32px;
  color: #ececec;
  font-size: 15px;
  line-height: 1.6;
}
.result {
  padding: 14px 0;
  border-bottom: 1px solid #242424;
  overflow-wrap: break-word;
}
.result:first-child { border-top: 1px solid #242424; }
.result time { color: #a0a0a0; white-space: nowrap; }
.secret-link { display: none; }

/* Archive layout stays intentionally separate from the search page. */
.archive-screen {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}
.archive-counter { text-align: center; }
.countdown {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: clamp(38px, 10vw, 96px);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  text-shadow: 0 0 22px rgba(255,255,255,.18);
}
.countdown-label { margin-top: 14px; color: #666; font-size: 12px; letter-spacing: .3em; }
.ambient-words { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-word {
  position: absolute;
  color: rgba(255,255,255,.09);
  font-size: clamp(12px, 1.6vw, 18px);
  letter-spacing: .12em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: ambient-life var(--life) ease-in-out forwards, ambient-drift var(--life) ease-in-out forwards;
  will-change: opacity, transform;
}
@keyframes ambient-life {
  0% { opacity: 0; }
  14% { opacity: var(--opacity); }
  76% { opacity: var(--opacity); }
  100% { opacity: 0; }
}
@keyframes ambient-drift {
  from { transform: translate(-50%, -50%); }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))); }
}

@media (max-width: 600px) {
  .shell { width: min(520px, calc(100% - 40px)); }
  .shell.has-searched { width: calc(100% - 40px); padding-top: 40px; }
  .search-row { flex-direction: column; gap: 10px; }
  button { width: 100%; flex-basis: 52px; }
  h1 { margin-bottom: 32px; letter-spacing: .025em; }
}
@media (max-height: 620px) and (min-width: 601px) {
  .shell { justify-content: flex-start; padding-top: 64px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  input, button { transition: none; }
  .ambient-word { animation-name: ambient-life; }
}
