/* EzDeck: a quiet, bright work surface. One brand colour, one accent, plenty of room. Light by default; dark when
   the device asks for it. Everything a finger presses is at least 44px high. */
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --sunk: #f0f2f9;
  --ink: #141a2e;
  --muted: #5b647c;
  --line: #e1e5f0;
  --brand: #3554f0;
  --brand-strong: #2740c8;
  --brand-soft: #e9edff;
  --on-brand: #ffffff;
  --accent: #f29d0b;
  --good: #0f7a57;
  --good-soft: #e3f6ee;
  --bad: #c22f43;
  --bad-soft: #fde8eb;
  --ask: #8a5a00;
  --ask-soft: #fff3d6;
  --shadow: 0 1px 2px rgba(20, 26, 46, 0.05), 0 8px 28px rgba(20, 26, 46, 0.07);
  --radius: 16px;
  --font: "Inter", "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic UI", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
html[lang^="zh"] {
  --font: "Inter", "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220;
    --surface: #171c2e;
    --sunk: #1e2438;
    --ink: #eef1fa;
    --muted: #9da6bf;
    --line: #2b3350;
    --brand: #6f86ff;
    --brand-strong: #8ea0ff;
    --brand-soft: #222b55;
    --on-brand: #0b1030;
    --good: #4fd3a4;
    --good-soft: #143528;
    --bad: #ff8696;
    --bad-soft: #40161d;
    --ask: #ffcd6b;
    --ask-soft: #3d2f0c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  padding: 0 max(1rem, env(safe-area-inset-right)) calc(3rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
h1,
h2,
h3,
p {
  margin: 0;
}
small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}
a {
  color: var(--brand);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
/* What is written once for each language: only the chosen one is shown. */
[data-for] {
  display: none;
}
html[data-spoken="ja"] [data-for="ja"],
html[data-spoken="zh"] [data-for="zh"],
html[data-spoken="en"] [data-for="en"] {
  display: revert;
}

/* ---- buttons and fields */
button,
.button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
button:hover:not(:disabled),
.button:hover {
  border-color: var(--brand);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.primary:hover:not(:disabled) {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.big {
  min-height: 52px;
  padding-inline: 1.6rem;
  font-size: 1.05rem;
  flex: 1 1 12rem;
}
.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.stop,
.danger {
  color: var(--bad);
}
.danger:hover:not(:disabled),
.stop:hover:not(:disabled) {
  border-color: var(--bad);
}
.switch {
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 500;
  text-align: left;
  padding-inline: 0.2rem;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: 1.25rem;
  min-height: 0;
  height: 1.25rem;
  accent-color: var(--brand);
  flex: none;
}
::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}
label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.93rem;
}
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.sheet form,
form.sheet {
  display: grid;
  gap: 0.9rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.message {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.93rem;
}
.message.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.message.good {
  background: var(--good-soft);
  color: var(--good);
}
.hint {
  color: var(--muted);
  font-size: 0.88rem;
}
.empty {
  color: var(--muted);
  padding: 0.6rem 0;
}
.notice {
  max-width: 46rem;
  margin: 0 auto 1rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: var(--ask-soft);
  color: var(--ask);
  font-size: 0.93rem;
}

/* ---- the top */
.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: calc(0.7rem + env(safe-area-inset-top)) 0 0.7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.logo {
  width: 30px;
  height: 30px;
}
.logo rect {
  fill: var(--brand);
}
.logo path {
  fill: #ffd166;
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--sunk);
}
.lang button {
  min-height: 34px;
  padding: 0.15rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.lang button[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 26, 46, 0.15);
}
.menu {
  position: relative;
}
.menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 9rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary.has-news::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  min-width: 15rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.menu-panel button,
.menu-link {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  text-align: left;
}
.menu-panel button:hover,
.menu-link:hover {
  background: var(--sunk);
}

/* ---- the door */
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(1rem, 6vh, 4rem) 0;
}
.pitch .kicker {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pitch h1 {
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(1.7rem, 3.7vw, 2.6rem);
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
  letter-spacing: -0.02em;
}
.pitch .sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
}
.values {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin: 1.6rem 0 0;
  padding: 0;
}
.values li {
  display: grid;
  gap: 0.1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.values span {
  color: var(--muted);
  font-size: 0.9rem;
}
.door {
  display: grid;
  gap: 0.8rem;
}
.lead {
  font-weight: 600;
}
.code {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
}

/* ---- the making screen */
#stage,
.admin {
  max-width: 46rem;
  margin: 0 auto;
}
.hero {
  padding: clamp(0.8rem, 4vh, 2.2rem) 0 1.2rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.35rem, 3.6vw, 1.95rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero p {
  margin-top: 0.4rem;
  color: var(--muted);
}
.composer {
  padding: 1.1rem;
}
.choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.choice button {
  border-width: 2px;
}
.choice button[aria-checked="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.kind button {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon name" "icon note";
  justify-content: start;
  justify-items: start;
  column-gap: 0.7rem;
  row-gap: 0;
  padding: 0.7rem 0.9rem;
  text-align: left;
  line-height: 1.3;
}
.kind-icon {
  grid-area: icon;
  font-size: 1.7rem;
}
.kind-name {
  grid-area: name;
  font-size: 1.02rem;
}
.kind small {
  grid-area: note;
}
.field-name {
  font-weight: 700;
}
.main-field textarea {
  min-height: 7.5rem;
  font-size: 1.05rem;
  border-width: 2px;
}
.main-field textarea:focus {
  border-color: var(--brand);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.chips-name {
  color: var(--muted);
  font-size: 0.85rem;
  margin-right: 0.2rem;
}
.chip {
  min-height: 36px;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  background: var(--sunk);
  border-color: transparent;
  font-size: 0.86rem;
  font-weight: 500;
}
.options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
}
.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  cursor: pointer;
}
.inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.inline select {
  width: auto;
}
.more {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}
.more summary,
.deck-more summary {
  cursor: pointer;
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.more[open] {
  display: grid;
  gap: 0.9rem;
}
.free {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: var(--good-soft);
  color: var(--good);
  font-size: 0.92rem;
  font-weight: 600;
}
.free.used {
  background: var(--ask-soft);
  color: var(--ask);
}
.card-price {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: var(--sunk);
}
.card-sum strong {
  font-size: 1.3rem;
  margin-left: 0.4rem;
}
.paypay-mark {
  font-weight: 800;
  color: #ff0033;
}

/* ---- the way in by voice: the first and largest thing in the composer */
.talk-big {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 84px;
  padding: 0.9rem 1.2rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--brand) 0%, #7a4df5 100%);
  color: #fff;
  text-align: left;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 35%, transparent);
}
.talk-big:hover:not(:disabled) {
  filter: brightness(1.07);
}
.talk-big .mic {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.7rem;
  animation: beckon 2.4s ease-out infinite;
}
@keyframes beckon {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
  }
}
.talk-words {
  display: grid;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}
.talk-words strong {
  font-size: 1.25rem;
  line-height: 1.3;
}
.talk-words small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  line-height: 1.4;
}
.talk-go {
  flex: none;
  font-size: 0.9rem;
  opacity: 0.85;
}
.talk-big:disabled {
  background: var(--sunk);
  color: var(--muted);
  box-shadow: none;
  opacity: 1;
}
.talk-big:disabled .mic {
  animation: none;
  background: var(--line);
}
.talk-big:disabled small {
  color: var(--muted);
}
.or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.9rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
/* Without the voice (no key), or while a talk is on, there is nothing to choose between. */
.talk-big[hidden] + .or {
  display: none;
}

/* ---- the confirmation card: the brief, whole, to be checked at a glance */
.confirm {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 2px solid var(--good);
  border-radius: 14px;
  background: color-mix(in srgb, var(--good-soft) 55%, var(--surface));
}
.confirm-head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.confirm-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
}
.confirm-head h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}
.confirm-head p {
  color: var(--muted);
  font-size: 0.86rem;
}
.confirm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.confirm-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.92rem;
}
.confirm-name {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.confirm-rows {
  display: grid;
  gap: 0.5rem;
}
.confirm-row {
  display: flex;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.confirm-icon {
  flex: none;
  font-size: 1.25rem;
  line-height: 1.5;
}
.confirm-row > div {
  min-width: 0;
  flex: 1;
}
.confirm-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.confirm-row p {
  font-size: 1.02rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.confirm-row p.confirm-empty {
  color: var(--muted);
  font-size: 0.92rem;
}
/* What the assistant has just changed: lit for a few seconds. */
.confirm .lit {
  animation: lit 4s ease-out 1;
}
@keyframes lit {
  0%,
  60% {
    background: var(--ask-soft);
    border-color: var(--accent);
  }
}

/* ---- talking with the assistant */
.talk-panel {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--brand-soft);
  --level: 0;
}
.talk-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 calc(4px + var(--level) * 14px) color-mix(in srgb, var(--brand) 25%, transparent);
  transition: box-shadow 0.08s linear;
  flex: none;
}
body[data-talk="calling"] .pulse {
  animation: calling 1s ease-in-out infinite;
}
@keyframes calling {
  50% {
    opacity: 0.35;
  }
}
.said p {
  max-height: 6.6em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.said-teller {
  font-size: 1.05rem;
}
.said-me {
  color: var(--muted);
  font-size: 0.92rem;
}
.said-me:not(:empty)::before {
  content: "🎙 ";
}

/* ---- what was made */
.past {
  margin-top: 2rem;
}
.past h2,
.admin h2 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}
.decks,
.users {
  display: grid;
  gap: 0.8rem;
}
.deck,
.user {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.deck.is-done {
  border-color: color-mix(in srgb, var(--good) 35%, var(--line));
}
.deck.is-ask {
  border-color: var(--accent);
}
.deck-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.deck-icon {
  font-size: 1.6rem;
  line-height: 1.2;
}
.deck-titles {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.deck-title {
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}
.deck-meta,
.user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.badge {
  flex: none;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge.working,
.badge.waiting {
  background: var(--brand-soft);
  color: var(--brand);
}
.badge.done {
  background: var(--good-soft);
  color: var(--good);
}
.badge.stopped,
.badge.trouble {
  background: var(--bad-soft);
  color: var(--bad);
}
.badge.ask {
  background: var(--ask-soft);
  color: var(--ask);
}
.progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.steps {
  list-style: none;
  display: flex;
  flex: 1 1 16rem;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.steps li {
  flex: 1;
  padding-top: 0.45rem;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.steps li.done {
  border-color: var(--brand);
  color: var(--ink);
}
.steps li.now {
  border-color: var(--brand);
  color: var(--brand);
  animation: working 1.4s ease-in-out infinite;
}
@keyframes working {
  50% {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  }
}
.elapsed {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.gets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.took {
  margin-left: auto;
  color: var(--good);
  font-weight: 700;
  font-size: 0.9rem;
}
.question {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: var(--ask-soft);
}
.deck-more[open] {
  display: grid;
  gap: 0.8rem;
}
.parts {
  display: grid;
  gap: 0.5rem;
}
.part {
  display: flex;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--sunk);
}
.part > div {
  min-width: 0;
  flex: 1;
}
/* A brief's words, set out to be read back: a paragraph to a sentence, lists as lists. */
.pretty {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.pretty p {
  margin: 0;
  white-space: normal;
}
.pretty ol,
.pretty ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem 0.8rem 0.5rem 2rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--brand-soft) 60%, transparent);
}
.pretty li::marker {
  color: var(--brand);
  font-weight: 700;
}
.paid {
  font-size: 0.9rem;
  color: var(--muted);
}
.report {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--sunk);
  font-size: 0.93rem;
  overflow-x: auto;
}
.report > :first-child {
  margin-top: 0;
}
.report h1,
.report h2,
.report h3,
.report h4 {
  margin: 1em 0 0.3em;
  font-size: 1rem;
}
.report p,
.report ul,
.report ol {
  margin: 0.4em 0;
}
.report ul,
.report ol {
  padding-left: 1.4em;
}
.report table {
  border-collapse: collapse;
  margin: 0.5em 0;
}
.report th,
.report td {
  padding: 0.25em 0.6em;
  border: 1px solid var(--line);
  text-align: left;
}
.report code {
  padding: 0.1em 0.3em;
  border-radius: 5px;
  background: var(--surface);
  font-size: 0.9em;
}
.files {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
}
.files a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  overflow-wrap: anywhere;
}

/* ---- the admin's screens */
.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
}
.admin .hint {
  margin-bottom: 1rem;
}
.admin h3 {
  font-size: 1rem;
}
.admin-list-title {
  margin: 1.6rem 0 0.6rem;
}
.with-button {
  display: flex;
  gap: 0.5rem;
}
.with-button button {
  white-space: nowrap;
}
.handover {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  border-color: var(--good);
}
.handover code {
  display: block;
  padding: 0.8rem;
  border-radius: 10px;
  background: var(--sunk);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.user.stopped {
  opacity: 0.7;
}
.user.waiting {
  border-color: var(--accent);
}
.user-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.user-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.user-actions select {
  width: auto;
  flex: 1 1 12rem;
}
.reset {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border-radius: 12px;
  background: var(--sunk);
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 14, 30, 0.55);
  overflow-y: auto;
}
.dialog {
  width: min(100%, 32rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  display: grid;
  gap: 0.8rem;
}
.dialog h2 {
  font-size: 1.15rem;
}
fieldset {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
legend {
  padding: 0 0.4rem;
  font-weight: 700;
  font-size: 0.93rem;
}
.voices label {
  grid-template-columns: 7rem 1fr;
  align-items: center;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, 34rem);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}
.toast.bad {
  background: var(--bad);
  color: #fff;
}

/* ---- the door: a resort on a bright day. A clear blue sky with drifting white clouds, a sun, glints of light,
   palm fronds and a turquoise sea; a cheerful palette of sky blue, royal blue, pink and sunny yellow on white.
   Shown only before signing in, and the same whatever the device's own scheme. */
body[data-auth="out"] {
  --sky: #2aa9e8;
  --royal: #1b4fa8;
  --pink: #ec4f93;
  --sunny: #ffd23f;
  --bg: #dff4ff;
  --surface: #ffffff;
  --sunk: #eaf6fd;
  --ink: #14357a;
  --muted: #47618f;
  --line: #cfe6f6;
  --brand: #1b6fd0;
  --brand-strong: #1b4fa8;
  --brand-soft: #e3f2fd;
  --on-brand: #ffffff;
  --accent: #ec4f93;
  --bad: #c22f43;
  --bad-soft: #fde8eb;
  --good: #0f7a57;
  --good-soft: #e3f6ee;
  color-scheme: light;
  background: linear-gradient(180deg, #37b3f0 0%, #7fd0f7 28%, #c8ecfd 56%, #f3fbff 78%, #ffffff 100%) fixed;
}
.tropic {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.sun {
  position: absolute;
  right: 5%;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0 24%, #ffe77a 25% 36%, rgba(255, 226, 110, 0.45) 37% 54%, rgba(255, 226, 110, 0) 72%);
  animation: sun 7s ease-in-out infinite;
}
@keyframes sun {
  50% {
    transform: scale(1.06);
  }
}
/* A cloud: one soft white shape made of a few overlapping rounds. */
.cloud {
  position: absolute;
  width: 220px;
  height: 70px;
  border-radius: 70px;
  background: #fff;
  box-shadow: 60px -28px 0 6px #fff, 120px -8px 0 -4px #fff;
  opacity: 0.95;
  filter: drop-shadow(0 10px 14px rgba(40, 130, 200, 0.12));
  animation: float 60s linear infinite;
}
.cloud.c1 {
  left: 6%;
  top: 11%;
  transform: scale(0.8);
}
.cloud.c2 {
  left: 52%;
  top: 6%;
  transform: scale(0.55);
  animation-duration: 85s;
  opacity: 0.85;
}
.cloud.c3 {
  left: 76%;
  top: 30%;
  transform: scale(0.7);
  animation-duration: 72s;
}
@keyframes float {
  50% {
    margin-left: 5vw;
  }
}
/* Glints of light in pink, yellow and white, twinkling: the page's little bit of sparkle. */
.sparkles {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(3px 3px at 12% 34%, #fff 50%, transparent 52%),
    radial-gradient(4px 4px at 23% 12%, var(--sunny) 50%, transparent 52%),
    radial-gradient(3px 3px at 38% 27%, var(--pink) 50%, transparent 52%),
    radial-gradient(4px 4px at 47% 9%, #fff 50%, transparent 52%),
    radial-gradient(3px 3px at 58% 41%, var(--sunny) 50%, transparent 52%),
    radial-gradient(4px 4px at 69% 17%, var(--pink) 50%, transparent 52%),
    radial-gradient(3px 3px at 84% 46%, #fff 50%, transparent 52%),
    radial-gradient(4px 4px at 93% 62%, var(--sunny) 50%, transparent 52%),
    radial-gradient(3px 3px at 5% 68%, var(--pink) 50%, transparent 52%),
    radial-gradient(3px 3px at 45% 72%, var(--sunny) 50%, transparent 52%);
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  50% {
    opacity: 0.35;
  }
}
.palm {
  position: absolute;
  width: min(24vw, 310px);
  fill: #19b87f;
  transform-origin: 13% 50%;
}
.palm g:nth-child(odd) {
  fill: #25cf93;
}
.palm-a {
  left: -8%;
  top: -17%;
  transform: rotate(52deg);
  animation: sway-a 7s ease-in-out infinite;
}
.palm-b {
  right: -8%;
  bottom: 4%;
  width: min(21vw, 270px);
  transform: scaleX(-1) rotate(-26deg);
  animation: sway-b 8s ease-in-out infinite;
}
@keyframes sway-a {
  50% {
    transform: rotate(56deg);
  }
}
@keyframes sway-b {
  50% {
    transform: scaleX(-1) rotate(-31deg);
  }
}
.waves {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: clamp(80px, 14vh, 140px);
}
.waves path {
  animation: drift 22s linear infinite;
}
.waves .w1 {
  fill: rgba(126, 222, 236, 0.55);
}
.waves .w2 {
  fill: rgba(64, 196, 228, 0.6);
  animation-duration: 16s;
  animation-direction: reverse;
}
.waves .w3 {
  fill: rgba(30, 160, 220, 0.8);
  animation-duration: 12s;
}
@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}
body[data-auth="out"] .top,
.login > .pitch,
.login > .door {
  position: relative;
  z-index: 1;
}
body[data-auth="out"] .top {
  padding-top: calc(1.1rem + env(safe-area-inset-top));
}
body[data-auth="out"] .brand {
  color: #fff;
  text-shadow: 0 2px 8px rgba(20, 80, 150, 0.35);
}
body[data-auth="out"] .logo rect {
  fill: #fff;
}
body[data-auth="out"] .logo path {
  fill: var(--pink);
}
body[data-auth="out"] .lang {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(20, 80, 150, 0.15);
}
body[data-auth="out"] .lang button[aria-checked="true"] {
  background: linear-gradient(180deg, #3aa8f0, #1b6fd0);
  color: #fff;
}
.login {
  gap: clamp(2rem, 5vw, 4.5rem);
}
.login .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(236, 79, 147, 0.22);
}
.login .kicker::before {
  content: "★";
  color: var(--sunny);
  letter-spacing: 0;
}
.login .pitch h1 {
  margin: 1rem 0 1.1rem;
  font-size: clamp(2rem, 4.1vw, 3.1rem);
  line-height: 1.3;
  font-weight: 800;
  color: var(--royal);
  text-shadow:
    0 2px 0 #fff,
    0 0 18px rgba(255, 255, 255, 0.9);
}
.login .pitch .sub {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.85;
}
.login .values {
  gap: 0;
  margin-top: 1.7rem;
  padding: 0.3rem 1.3rem;
  border: 2px solid #fff;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(20, 100, 180, 0.2);
}
.login .values li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border: 0;
  border-bottom: 2px dotted #cfe6f6;
  border-radius: 0;
  background: none;
}
.login .values li:last-child {
  border-bottom: 0;
}
.login .values .vi {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4db8f5, #1b6fd0);
  box-shadow: 0 6px 14px rgba(27, 111, 208, 0.35);
}
.login .values li:nth-child(2) .vi {
  background: linear-gradient(180deg, #ff8fbd, #ec4f93);
  box-shadow: 0 6px 14px rgba(236, 79, 147, 0.35);
}
.login .values li:nth-child(3) .vi {
  background: linear-gradient(180deg, #ffe07a, #ffb72b);
  box-shadow: 0 6px 14px rgba(255, 183, 43, 0.4);
}
.login .values .vi svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login .values div {
  display: grid;
  gap: 0.2rem;
}
.login .values strong {
  font-size: 1.1rem;
  color: var(--royal);
}
.login .values div span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.login .door .lead {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--royal);
}
.login .door .sheet {
  padding: 1.8rem;
  border: 2px solid #fff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(20, 100, 180, 0.28);
}
.login .door input {
  min-height: 48px;
  border-width: 2px;
  background: #f8fcff;
}
.login .door input:focus {
  border-color: var(--sky);
}
.login .door .primary {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6fa8 0%, #ec4f93 55%, #d93a86 100%);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 0 10px 24px rgba(236, 79, 147, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.login .door .primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.login .switch {
  display: flex;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: 2px solid #1b6fd0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1b6fd0;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}
.login .switch:hover {
  background: #1b6fd0;
  color: #fff;
}

@media (max-width: 760px) {
  .palm {
    width: 44vw;
  }
  .palm-b,
  .cloud.c3 {
    display: none;
  }
  .sun {
    width: 170px;
    height: 170px;
    right: -40px;
  }
  .login {
    padding-bottom: 7rem;
  }
  .login .kicker {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
  .login .values div span {
    display: none;
  }
  .login .values li {
    align-items: center;
    padding: 0.7rem 0;
  }
}
@media (max-width: 760px) {
  .login {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 0.5rem;
  }
  .inline {
    margin-left: 0;
  }
  .took {
    margin-left: 0;
    flex-basis: 100%;
  }
  .brand span {
    display: none;
  }
}
@media (max-width: 420px) {
  .kind button {
    grid-template-columns: 1fr;
    grid-template-areas: "icon" "name" "note";
    justify-items: center;
    text-align: center;
  }
  .gets .button {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* With the card out there is nothing to write: the line that offers writing steps aside. */
.or:has(~ .confirm:not([hidden])) {
  visibility: hidden;
  margin: 0.3rem 0;
  height: 0;
}
