/* The adult's area speaks the home's language: rounded type, cream paper,
   flat enclosure colours and chunky buttons with a solid shadow. */
:root {
  color-scheme: light;
  --ink: #24527e;
  --ink-soft: #345267;
  --paper: #fffdf6;
  --line: #e6e1cf;
  --sun: #ffdc58;
  --sun-ink: #725211;
  --sun-edge: #d3ac33;
  --leaf: #397d31;
  --leaf-bg: #eaf6dc;
  --round:
    "Arial Rounded MT Bold", "Arial Rounded MT", ui-rounded, "Trebuchet MS",
    sans-serif;
  --text: ui-rounded, system-ui, -apple-system, sans-serif;
  font-family: var(--text);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
}
header,
main,
footer {
  max-width: 1080px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
a {
  color: var(--ink);
}
.brand {
  font-family: var(--round);
  font-size: 25px;
  text-decoration: none;
}
header a:last-child {
  color: var(--ink-soft);
  text-decoration: none;
}
h1,
h2,
h3,
summary {
  font-family: var(--round);
  font-weight: normal;
  color: var(--ink);
}
h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2 {
  line-height: 1.2;
}
p {
  max-width: 68ch;
  color: var(--ink-soft);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
article,
.note,
form,
.panel {
  background: #fff;
  padding: 24px;
  border: 2px solid var(--line);
  border-radius: 20px;
  margin: 16px 0;
}
article form {
  padding: 0;
  border: 0;
  margin: 20px 0 0;
}
.note {
  background: #fff9e3;
}
button,
.button {
  display: inline-block;
  font: inherit;
  font-family: var(--round);
  border: 0;
  border-radius: 14px;
  padding: 11px 20px;
  background: var(--sun);
  color: var(--sun-ink);
  box-shadow: 0 4px 0 var(--sun-edge);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--sun-edge);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 0 var(--line);
  border: 2px solid var(--line);
}
.danger {
  background: #fbe3dd;
  color: #8a3333;
  box-shadow: 0 3px 0 #e5b3a8;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
label,
.field-title {
  display: block;
  margin: 14px 0 6px;
  font-family: var(--round);
  color: var(--ink);
}
input,
select,
textarea {
  font: inherit;
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input::placeholder {
  color: #b9c3cc;
}
input[type="file"] {
  max-width: 100%;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--sun-edge);
  outline-offset: 2px;
}
.balance {
  font-family: var(--round);
  font-size: 2rem;
  margin: 4px 0;
  color: var(--ink);
}
.muted,
small {
  color: #5d7385;
}
#message:empty {
  display: none;
}
.error {
  padding: 14px 16px;
  background: #fbe3dd;
  color: #8a3333;
  border-radius: 14px;
}
.success {
  padding: 14px 16px;
  background: var(--leaf-bg);
  color: var(--leaf);
  border-radius: 14px;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-family: var(--round);
  font-weight: normal;
}
tr:last-child td {
  border-bottom: 0;
}
td:last-child {
  white-space: normal;
  min-width: 140px;
}
td button {
  padding: 6px 12px;
}
summary {
  cursor: pointer;
}
footer {
  font-size: 0.85rem;
  color: #6b7f8f;
  margin-top: 32px;
}
code {
  overflow-wrap: anywhere;
}
dialog {
  max-width: 520px;
  border: 0;
  border-radius: 22px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 50px #23384b55;
}
dialog::backdrop {
  background: #23384b80;
}
.share-dialog .qr {
  display: block;
  width: min(240px, 70vw);
  margin: 12px auto;
  border-radius: 12px;
}
.lookup:empty {
  display: none;
}

/* ——— Walkthrough: one question per card ——— */
.walk {
  max-width: 620px;
  margin: 0 auto;
}
.walk-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.walk-dots {
  display: flex;
  flex: 1;
  gap: 6px;
}
.walk-dots i {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
  transition: background 0.3s;
}
.walk-dots i.on {
  background: var(--sun);
}
.walk-aside {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.walk > .walk-aside {
  justify-content: flex-end;
  margin-bottom: 14px;
}
.walk .walk-link {
  padding: 4px 6px;
  background: none;
  box-shadow: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.walk-card,
form.walk-card {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  margin: 0;
  padding: clamp(22px, 5vw, 36px);
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #fff;
}
.walk-card.entry {
  min-height: 0;
}
.walk-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}
.walk-card h1:focus {
  outline: none;
}
.walk-card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.walk-card p {
  margin: 0 0 12px;
}
.walk-step {
  margin: 0 0 6px !important;
  font-family: var(--round);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a9aa8 !important;
}
.walk-card.in-forward {
  animation: walk-in 0.32s ease-out;
}
.walk-card.in-back {
  animation: walk-back 0.32s ease-out;
}
@keyframes walk-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}
@keyframes walk-back {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}
.walk-text,
.walk-money {
  margin: 4px 0 14px;
  font-family: var(--round);
  font-size: 1.6rem;
  padding: 12px 16px;
  border-radius: 16px;
}
.walk-money-wrap {
  position: relative;
}
.walk-money-prefix {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-58%);
  font-family: var(--round);
  font-size: 1.6rem;
  color: #8a9aa8;
  pointer-events: none;
}
.walk-money-wrap .walk-money {
  padding-left: 62px;
}
.walk-fun {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--leaf-bg);
  color: var(--leaf) !important;
}
.walk-fun p {
  color: var(--leaf);
  margin: 0 0 4px;
}
.walk-fun p:last-child {
  margin: 0;
}
.walk-hint {
  font-size: 0.9rem;
  color: #6b7f8f !important;
}
.walk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.walk .walk-chip,
.walk-tile {
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
}
.walk .walk-chip.is-selected,
.walk-tile[aria-checked="true"],
.walk-icon[aria-checked="true"] {
  border-color: var(--sun-edge);
  background: #fff6cf;
  box-shadow: 0 3px 0 var(--sun-edge);
}
.walk-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 14px;
}
.walk-tile {
  padding: 18px 12px;
  font-size: 1.1rem;
}
.walk-rate {
  margin: 8px 0 4px !important;
  font-family: var(--round);
  font-size: 1.1rem;
  color: var(--ink) !important;
}
.walk-rate strong {
  font-size: 2.6rem;
  font-weight: normal;
  letter-spacing: -0.02em;
}
.walk-slider {
  margin: 4px 0 14px;
  padding: 0;
  border: 0;
  accent-color: var(--sun-edge);
  height: 32px;
}
.walk-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  margin: 8px 0 12px;
}
.walk-notes > .walk-hint {
  flex-basis: 100%;
  margin: 0;
}
.walk-note {
  --w: clamp(52px, 13vw, 72px);
  margin: 0;
  text-align: center;
  animation: note-in 0.4s cubic-bezier(0.3, 1.4, 0.6, 1) both;
}
.walk-note:nth-child(2) {
  animation-delay: 0.05s;
}
.walk-note:nth-child(3) {
  animation-delay: 0.1s;
}
.walk-note:nth-child(4) {
  animation-delay: 0.15s;
}
.walk-note:nth-child(5) {
  animation-delay: 0.2s;
}
@keyframes note-in {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(-6deg);
  }
}
.walk-note-paper {
  position: relative;
  display: block;
  width: var(--w);
  height: calc(var(--w) * 1.41421356);
  margin: 0 auto;
}
.walk-note-paper b,
.walk-note-copy {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--fill) var(--note-art) center / 100% 100% no-repeat;
  box-shadow:
    2px 2px 4px #23384b55,
    0 0 1px #23384b80;
}
.walk-note-copy:nth-child(1) {
  transform: translate(5px, -3px) rotate(4deg);
}
.walk-note-copy:nth-child(2) {
  transform: translate(9px, -5px) rotate(8deg);
}
.walk-note-copy:nth-child(3) {
  transform: translate(12px, -6px) rotate(11deg);
}
.walk-note-paper b {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 7%;
  gap: 1px;
  font-family: var(--round);
  font-weight: normal;
  font-size: calc(var(--w) * 0.34);
  line-height: 1;
  letter-spacing: -1px;
  color: var(--tone);
  text-shadow: 0 1px 0 #ffffff60;
}
.walk-note-paper b small {
  font-size: 0.45em;
  color: inherit;
  margin-top: 0.15em;
}
.walk-note-paper em {
  position: absolute;
  z-index: 2;
  right: -10px;
  bottom: -8px;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--tone);
  color: #fff;
  font-family: var(--round);
  font-style: normal;
  font-size: 0.85rem;
}
.walk-note figcaption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.walk-icons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
  max-width: 420px;
}
.walk-icon,
.walk .walk-icon {
  padding: 5px;
  background: #fff;
  border: 3px solid transparent;
  border-radius: 22px;
  box-shadow: none;
}
.walk-icon img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
}
.walk-icon[aria-checked="true"] {
  transform: scale(1.04);
}
.walk-home {
  display: flex;
  justify-content: center;
  padding: 18px;
  border-radius: 18px;
  background: #cfe4f6;
}
.walk-home span {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.walk-home img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 3px 8px #23384b40;
}
.walk-home small {
  font-size: 0.8rem;
  color: var(--ink);
}
.walk-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: center;
  margin: 4px 0 16px;
}
.walk-summary dt {
  color: var(--ink-soft);
}
.walk-summary dd {
  margin: 0;
}
.walk .walk-edit {
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  background: none;
  box-shadow: none;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.1rem;
}
.walk .walk-edit:hover {
  background: #fff6cf;
}
.walk-edit::after {
  content: "alterar";
  float: right;
  font-family: var(--text);
  font-size: 0.8rem;
  color: #8a9aa8;
  margin-top: 4px;
}
.walk-error {
  min-height: 1.4em;
  margin: 8px 0 0 !important;
  color: #a83e32 !important;
}
.walk-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}
.walk .walk-next {
  margin-left: auto;
  padding: 14px 28px;
  font-size: 1.05rem;
}
.walk .walk-back {
  background: none;
  box-shadow: none;
  color: var(--ink-soft);
  padding: 12px 8px;
}
.walk-signin label {
  margin-top: 4px;
}
.walk-signin input {
  font-family: var(--round);
  font-size: 1.4rem;
  padding: 12px 16px;
  border-radius: 16px;
}
.walk-share {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 12px 0 18px;
}
.walk-share .qr {
  width: 100%;
  border-radius: 14px;
  border: 2px solid var(--line);
}
.walk-share-icon {
  float: left;
  width: 48px;
  height: 48px;
  margin: 0 12px 8px 0;
  border-radius: 12px;
  box-shadow: 0 2px 6px #23384b40;
}
.walk-url {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.walk-keys {
  background: #fff6cf;
  color: var(--sun-ink) !important;
}
.walk-keys h2,
.walk-keys p {
  color: var(--sun-ink);
}
.walk-keys p {
  margin-bottom: 12px !important;
}
.walk-done .walk-card h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}
@media (prefers-reduced-motion: reduce) {
  .walk-card.in-forward,
  .walk-card.in-back,
  .walk-note {
    animation: none;
  }
}
@media (max-width: 600px) {
  header,
  main,
  footer {
    padding: 16px;
  }
  header a:last-child {
    font-size: 0.85rem;
  }
  article,
  form,
  .panel {
    padding: 18px;
  }
  .actions button {
    flex-grow: 1;
  }
  .walk-card,
  form.walk-card {
    min-height: 0;
    border-radius: 22px;
  }
  .walk-share {
    grid-template-columns: 1fr;
  }
  .walk-share .qr {
    max-width: 220px;
    justify-self: center;
  }
}

/* ——— Admin: reserves as enclosures ——— */
.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}
.admin-top h1 {
  margin: 12px 0 20px;
}
.admin-who {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.admin-who span {
  margin-right: 8px;
  font-family: var(--round);
  color: var(--ink);
}
.admin-who .walk-link,
.walk-link {
  padding: 4px 6px;
  background: none;
  box-shadow: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.keys-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 20px;
  padding: 18px 22px;
  border-radius: 20px;
  background: #fff6cf;
}
.keys-banner h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--sun-ink);
}
.keys-banner p {
  margin: 0;
  color: var(--sun-ink);
}
.reserves {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  align-items: start;
}
article.reserve {
  margin: 0;
  padding: 0 0 20px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 0 0 2px var(--line),
    0 6px 0 var(--line);
}
.reserve > * {
  margin-left: 22px;
  margin-right: 22px;
}
.reserve-top {
  display: flex;
  justify-content: flex-start;
  max-width: none;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 18px 22px;
  background: var(--fill);
  color: var(--tone);
}
.reserve-top img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 2px 6px #23384b40;
}
.reserve-top h2 {
  margin: 0;
  font-size: 1.4rem;
}
.reserve-top h2 a {
  color: var(--tone);
  text-decoration: none;
}
.reserve-top h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.reserve-top > div {
  position: relative;
}
.reserve-open {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tone);
  opacity: 0.85;
}
.reserve .balance {
  margin-bottom: 0;
}
.reserve-split {
  margin-top: 0;
  font-size: 0.95rem;
}
.reserve-facts {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 12px 14px 12px 32px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.reserve-facts li + li {
  margin-top: 4px;
}
.reserve-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 8px;
}
.reserve-actions button {
  white-space: nowrap;
  padding: 9px 10px;
  font-size: 0.95rem;
}
.reserve-history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.reserve-history h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.reserve-recent {
  margin: 0;
  padding: 0;
  list-style: none;
}
.reserve-recent li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.95rem;
}
.reserve-recent strong {
  font-family: var(--round);
  font-weight: normal;
}
.in {
  color: var(--leaf);
}
.out {
  color: #a83e32;
}
tr.is-cancelled td {
  color: #8a9aa8;
}
tr.is-cancelled td.out {
  text-decoration: line-through;
}
.reserve-new {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 200px;
  border: 3px dashed var(--line);
  border-radius: 24px;
  background: none;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.reserve-new:hover {
  border-color: var(--sun-edge);
  background: #fffbea;
  color: var(--ink);
}
.reserve-plus {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 4px 0 var(--sun-edge);
}
main > h2 {
  margin-top: 40px;
}
.sheet {
  width: min(520px, calc(100vw - 32px));
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.sheet-head h2 {
  margin: 0 0 12px;
}
.sheet .sheet-close {
  padding: 4px 6px;
  background: none;
  box-shadow: none;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sheet form {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.sheet form button[type="submit"] {
  margin-top: 6px;
}
.config-dialog .walk-icons {
  max-width: 100%;
}
.security {
  margin-top: 36px;
  padding: 20px 24px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.security summary {
  font-size: 1.15rem;
}
.checklist {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  position: relative;
  padding: 6px 0 6px 32px;
}
.checklist li::before {
  position: absolute;
  left: 0;
  top: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8rem;
  line-height: 1;
}
.checklist .ok::before {
  content: "✓";
  background: var(--leaf-bg);
  color: var(--leaf);
}
.checklist .todo::before {
  content: "!";
  background: #fff6cf;
  color: var(--sun-ink);
}
.security .note {
  border: 0;
}
