/* Login page: full-screen console for the token entry rite. */

.console {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  max-width: 960px; margin: 0 auto;
  zoom: var(--zoom, 1);                       /* text size setting */
  height: calc(100vh / var(--zoom, 1));
  height: calc(100dvh / var(--zoom, 1));
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  font-size: 22px;
  text-shadow: var(--text-glow);
  letter-spacing: 1px;
}

.console-head, .console-foot {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 17px; color: var(--text-dim);
}
.console-head { padding-bottom: 4px; border-bottom: 1px dashed var(--line-dim); }
.console-foot { padding-top: 6px; border-top: 1px dashed var(--line-dim); color: var(--text-faint); }

.console-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 0;
  scrollbar-width: thin; scrollbar-color: var(--line-dim) transparent;
}

/* ---------- printed lines ---------- */
.ln { min-height: 1.15em; line-height: 1.15; white-space: pre-wrap; overflow-wrap: anywhere; }
.ln-title { font-size: 28px; margin-bottom: 4px; }
.ln-dim   { color: var(--text-dim); }
.ln-echo  { color: var(--text-dim); }
.ln-error { animation: alert-flash .6s steps(1); }
.ln-error::before { content: '!! '; }
.ln-granted { display: inline-block; padding: 0 8px; background: var(--text); color: var(--ink); text-shadow: none; }

/* "> LABEL ........ STATUS" */
.ln-row { display: flex; align-items: baseline; gap: 8px; }
.ln-dots { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--line-dim); transform: translateY(-5px); }
.ln-status { text-transform: uppercase; }

/* ---------- input ---------- */
.prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.prompt[hidden] { display: none; }
.prompt-label { font-size: 26px; }
.prompt-input {
  flex: 1; min-width: 180px; min-height: 48px; padding: 6px 10px;
  font: inherit; font-size: 26px; letter-spacing: 2px; text-shadow: inherit;
  color: var(--text); caret-color: var(--text);
  background: rgba(var(--panel-rgb), .6);
  border: 1px solid var(--line); border-radius: 0;
  outline: none;
}
.prompt-input:focus { box-shadow: 0 0 12px rgba(var(--hi-rgb), .3); }
.prompt.is-denied { animation: denied .36s steps(1); }

/* leaving: collapse to a bright line, like switching apps */
.console.is-off { animation: console-off .35s ease-in forwards; }

@keyframes console-off {
  0%   { transform: none; filter: none; }
  60%  { transform: scaleY(.02); filter: brightness(3); }
  100% { transform: scale(0, .02); opacity: 0; }
}
@keyframes alert-flash { 0%, 50% { opacity: .3 } 25%, 75% { opacity: 1 } }
@keyframes denied { 0% { transform: translateX(-3px) } 33% { transform: translateX(3px) } 66% { transform: translateX(-2px) } 100% { transform: none } }

@media (max-width: 420px) {
  .ln-title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .console.is-off, .ln-error, .prompt.is-denied { animation: none; }
}
