/*
 * Livros: a card catalogue drawer.
 * The page is the oak of the drawer, every book is a typed index card, letters sit in brass
 * label holders, and status is a rubber stamp. Lusitana (after the 1572 Os Lusíadas) for titles,
 * Courier Prime for the typed entries, Atkinson Hyperlegible for everything a hand has to press.
 */

@font-face {
  font-family: "Lusitana";
  src: url("/build/fonts/lusitana-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lusitana";
  src: url("/build/fonts/lusitana-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("/build/fonts/courier-prime-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("/build/fonts/courier-prime-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/build/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/build/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --oak: #2b2019;
  --oak-raised: #36281f;
  --oak-line: #4b3a2d;
  --brass: #c9a24d;
  --brass-bright: #e3c27a;
  --paper: #fbf8f1;
  --paper-edge: #ddd3bf;
  --ink: #1f1b17;
  --ink-soft: #5c5249;
  --chalk: #f3ede2;
  --chalk-soft: #c7baa6;
  --red-line: #b4342b;
  --rule: #bccde4;
  --keep: #2e6b47;
  --wish: #2f4f9b;
  --alarm: #f2a094;

  --display: "Lusitana", "Iowan Old Style", Georgia, serif;
  --typed: "Courier Prime", "Courier New", ui-monospace, monospace;
  --ui: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;

  --tabs-h: 4.1rem;
  color-scheme: dark;
}

/* At night the drawer darkens and the cards lose their glare. */
@media (prefers-color-scheme: dark) {
  :root {
    --oak: #191310;
    --oak-raised: #221a15;
    --oak-line: #33281f;
    --paper: #ebe5d8;
    --paper-edge: #c9bfac;
  }
}

* {
  box-sizing: border-box;
}

/* -apple-system-body follows the iPhone's text size setting. */
html {
  font: -apple-system-body;
  -webkit-text-size-adjust: 100%;
  background: var(--oak);
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--chalk);
  background: var(--oak);
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: env(safe-area-inset-top);
  background: var(--oak);
}

body.has-tabs {
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--brass-bright);
  outline-offset: 2px;
}

.icon {
  width: 1.4em;
  height: 1.4em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main {
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 0.9rem) max(1rem, env(safe-area-inset-right)) 2.5rem
    max(1rem, env(safe-area-inset-left));
}

/* Paper surfaces use light form controls, whatever the page does. */
.card,
.ficha,
.help,
.search,
.field__input {
  color-scheme: light;
}

/* Headings on the oak */

.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.35rem 0 0.9rem;
}

.heading__title {
  margin: 0;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--chalk);
}

.view--form .heading__title {
  margin: 0.4rem 0 0.2rem;
}

.lede {
  margin: 0 0 1.1rem;
  color: var(--chalk-soft);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.75rem;
  margin-left: -0.4rem;
  font-weight: 700;
  color: var(--chalk);
  text-decoration: none;
}

/* Search slip and filters */

.toolbar {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 5;
  margin: 0 -1rem;
  padding: 0.4rem 1rem 0.75rem;
  background: var(--oak);
  border-bottom: 1px solid var(--oak-line);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 0.9rem;
  color: var(--ink);
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.search:focus-within {
  outline: 3px solid var(--brass-bright);
}

.search .icon {
  color: var(--ink-soft);
}

.search__input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.search__input::placeholder {
  font-family: var(--typed);
  color: var(--ink-soft);
}

/* Filters: brass tabs, then the iPhone's own wheel pickers for publisher and place */

.filters {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.filters:empty {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  min-height: 2.65rem;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brass-bright);
  background: transparent;
  border: 1.5px solid var(--brass);
  border-radius: 4px;
}

.chip.is-on {
  color: var(--oak);
  background: var(--brass);
}

.pickers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem;
}

.picker {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.picker__label {
  font-family: var(--typed);
  font-size: 0.8rem;
  color: var(--chalk-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.picker__select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0 2rem 0 0.75rem;
  overflow: hidden;
  font-family: var(--typed);
  font-size: 0.95rem;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--paper)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235c5249' stroke-width='2'/></svg>")
    no-repeat right 0.75rem center;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  color-scheme: light;
  -webkit-appearance: none;
  appearance: none;
}

.filters__clear {
  justify-self: start;
}

.sort {
  min-height: 2.6rem;
  padding: 0 0.5rem;
  font-family: var(--typed);
  font-size: 0.95rem;
  color: var(--brass-bright);
  background: transparent;
  border: 1.5px solid var(--brass);
  border-radius: 3px;
}

.list__count {
  margin: 0.9rem 0 0;
  font-family: var(--typed);
  font-size: 0.95rem;
  color: var(--chalk-soft);
}

/* Brass label holders, one per letter, riveted to the oak */

.letter {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1.6rem 0 0.7rem;
  padding-left: 0.85rem;
  font-size: inherit;
  font-weight: inherit;
}

.letter::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--oak-line);
}

.letter__plate {
  position: relative;
  min-width: 3.4rem;
  padding: 0.1rem 0.9rem;
  font-family: var(--typed);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--brass);
  border-radius: 2px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.letter__plate::before,
.letter__plate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.36rem;
  height: 0.36rem;
  margin-top: -0.18rem;
  background: var(--brass);
  border-radius: 50%;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.35);
}

.letter__plate::before {
  left: -0.8rem;
}

.letter__plate::after {
  right: -0.8rem;
}

/* Index cards: the author typed above the red line, the title below */

.card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 0 0 0.55rem;
  padding: 0.6rem 0.85rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.22);
}

a.card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.card__body,
.card__link {
  flex: 1;
  min-width: 0;
}

.card__link {
  color: inherit;
  text-decoration: none;
}

.card__author {
  overflow: hidden;
  padding-bottom: 0.22rem;
  font-family: var(--typed);
  font-size: 0.92rem;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  border-bottom: 1.5px solid var(--red-line);
}

.card__title {
  display: -webkit-box;
  margin-top: 0.32rem;
  overflow: hidden;
  font-family: var(--display);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.22;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card__meta {
  margin-top: 0.2rem;
  font-family: var(--typed);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.card__note {
  margin-top: 0.3rem;
  font-family: var(--typed);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--keep);
}

.card__list {
  margin-top: 0.25rem;
  font-family: var(--typed);
  font-size: 0.85rem;
  font-weight: 700;
}

.card__list--owned {
  color: var(--keep);
}

.card__list--wishlist {
  color: var(--wish);
}

.card__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.mark {
  padding: 0.02rem 0.4rem;
  font-family: var(--typed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.mark--loan {
  color: var(--red-line);
}

.mark--read {
  color: var(--wish);
}

.mark--stars {
  padding-inline: 0;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  border: 0;
}

.card--action {
  align-items: center;
}

.card--found {
  margin-top: 0.9rem;
}

.card.is-stamped {
  padding-top: 3.4rem;
}

.cover {
  flex: none;
  width: 2.8rem;
  height: 4rem;
  overflow: hidden;
  background: var(--paper-edge);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover--big {
  width: 5.6rem;
  height: 8.2rem;
}

.sentinel {
  height: 1px;
}

/* The full catalogue card, with its call number and the hole for the drawer rod */

.ficha {
  position: relative;
  margin: 0.75rem 0 1.4rem;
  padding: 1rem 1.15rem 2.7rem;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 16px 32px rgba(0, 0, 0, 0.35);
}

.ficha::after {
  content: "";
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: -0.525rem;
  background: var(--oak);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6);
}

.ficha--plain {
  padding-top: 0.4rem;
}

.ficha__head {
  position: relative;
  margin-bottom: 0.35rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--red-line);
}

.ficha__call {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--typed);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.ficha__author {
  padding-right: 4.8rem;
  font-family: var(--typed);
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.ficha__title {
  margin: 0.3rem 0 0;
  font-family: var(--display);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.12;
}

.ficha .cover--big {
  float: right;
  margin: 0.7rem 0 0.6rem 1rem;
}

.ficha__fields {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
}

.ficha__fields dt,
.ficha__fields dd {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.ficha__fields dt {
  padding-right: 1rem;
  font-family: var(--typed);
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ficha__fields dd {
  font-family: var(--typed);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.ficha__notes {
  clear: both;
  margin: 0.9rem 0 0;
  font-family: var(--typed);
  font-size: 1rem;
  white-space: pre-wrap;
}

.ficha__stamps {
  display: flex;
  clear: both;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

/* Rubber stamps: double border, typed caps, a little ink loss */

.stamp {
  --tilt: -6deg;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-family: var(--typed);
  line-height: 1.15;
  color: var(--red-line);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 4px double currentColor;
  border-radius: 6px;
  transform: rotate(var(--tilt));
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='70'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 0 0 0 2.6'/></filter><rect width='140' height='70' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='70'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 0 0 0 2.6'/></filter><rect width='140' height='70' filter='url(%23n)'/></svg>");
}

.stamp__main {
  font-size: 1.2rem;
  font-weight: 700;
}

.stamp__sub {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.stamp--read {
  --tilt: 4deg;
  color: var(--wish);
}

.stamp--keep {
  color: var(--keep);
}

.stamp--wish {
  color: var(--wish);
}

.stamp--none {
  color: var(--ink-soft);
}

.stamp--corner {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
}

.stamp.is-new {
  animation: stamp-in 260ms cubic-bezier(0.2, 0.8, 0.3, 1.25) both;
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(var(--tilt)) scale(1.7);
  }

  to {
    opacity: 1;
    transform: rotate(var(--tilt)) scale(1);
  }
}

/* Buttons: brass for the main action, outlines for the rest */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.1rem;
  padding: 0 1.15rem;
  font: inherit;
  font-weight: 700;
  color: var(--chalk);
  background: transparent;
  border: 1.5px solid var(--chalk-soft);
  border-radius: 4px;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
}

.btn--primary {
  color: var(--oak);
  background: var(--brass);
  border-color: var(--brass);
}

.btn--quiet {
  background: rgba(243, 237, 226, 0.07);
  border-color: transparent;
}

.btn--danger {
  color: var(--alarm);
}

.btn--wide {
  width: 100%;
}

.btn--small {
  flex: none;
  min-height: 2.6rem;
  padding: 0 0.8rem;
  font-size: 0.95rem;
}

.btn--toggle.is-on {
  color: var(--oak);
  background: var(--chalk);
  border-color: var(--chalk);
}

.btn--light {
  color: #1f1b17;
  background: rgba(251, 248, 241, 0.94);
  border-color: transparent;
}

.btn--scan {
  width: 100%;
  min-height: 4.4rem;
  margin: 0.2rem 0 1rem;
  font-size: 1.25rem;
}

.btn--scan .icon {
  width: 1.8em;
  height: 1.8em;
}

.btn--add {
  display: flex;
  margin: 1.6rem auto 0;
}

/* On paper the buttons are inked, not brassed. */
.card .btn,
.ficha .btn {
  color: var(--ink);
  border-color: var(--ink);
}

.ficha .btn--primary {
  color: var(--paper);
  background: var(--ink);
}

.actions {
  display: grid;
  justify-items: start;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.actions > .btn--wide {
  justify-self: stretch;
}

.actions__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.actions__group {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--oak-line);
}

.dupe {
  margin: -0.4rem 0 1.2rem;
}

.dupe .note {
  margin-top: 0;
  font-weight: 700;
  color: var(--brass-bright);
}

.dupe .btn {
  margin-top: 0.1rem;
}

.stack {
  display: grid;
  gap: 0.6rem;
}

.stars {
  display: flex;
}

.stars__star {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  background: none;
  border: 0;
}

.stars__star .icon {
  width: 2rem;
  height: 2rem;
  stroke: var(--chalk-soft);
}

.stars__star.is-on .icon {
  fill: var(--brass);
  stroke: var(--brass);
}

.loan {
  justify-self: stretch;
}

.loan__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.loan__form .field__input {
  flex: 1 1 12rem;
}

/* Forms: on the card, fields are ruled lines to fill in */

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.25rem;
}

.field__label {
  font-family: var(--typed);
  font-size: 0.82rem;
  color: var(--chalk-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.field__input:focus {
  outline: 3px solid var(--brass-bright);
}

.ficha .field__label {
  color: var(--ink-soft);
}

.ficha--form .field__input {
  padding-inline: 0;
  background: transparent;
  border-bottom: 1.5px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.ficha--form .field__input:focus {
  border-bottom-color: var(--ink);
  outline: none;
}

.field__input--area {
  min-height: 6rem;
  resize: vertical;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}

.segmented__option {
  min-height: 3rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.segmented__option.is-on {
  color: var(--paper);
  background: var(--ink);
}

/* Messages */

.note {
  margin: 0.8rem 0;
  color: var(--chalk-soft);
}

.note--count {
  font-family: var(--typed);
}

.note--error {
  font-weight: 700;
  color: var(--alarm);
}

.note--error:empty {
  display: none;
}

.ficha .note {
  color: var(--ink-soft);
}

.ficha .note--error {
  color: var(--red-line);
}

.note--offline {
  font-family: var(--typed);
  font-size: 0.9rem;
}

.empty {
  padding: 2.5rem 1rem;
  color: var(--chalk-soft);
  text-align: center;
}

.empty p {
  margin: 0 0 1rem;
}

.help {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem 1.1rem;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.help__title {
  margin: 0 0 0.6rem;
  padding-bottom: 0.45rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: 2px solid var(--red-line);
}

.help__steps {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.4rem;
}

.help__steps li::marker {
  font-family: var(--typed);
  font-weight: 700;
}

/* "Já tenho?" */

.check__form {
  display: flex;
  gap: 0.5rem;
}

.check__form .search {
  flex: 1;
  min-width: 0;
}

.online__item {
  margin-top: 1rem;
}

.online__item .actions__row {
  margin-top: 0.1rem;
}

.scanner {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #000;
}

.scanner__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner__frame {
  position: relative;
  width: min(80vw, 22rem);
  aspect-ratio: 2 / 1;
  border: 3px solid var(--brass-bright);
  border-radius: 6px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
}

.scanner__hint {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 1.5rem);
  right: 1rem;
  left: 1rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px #000;
}

.scanner .btn {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
  left: 50%;
  min-width: 12rem;
  transform: translateX(-50%);
}

/* Sign-in and invite */

.view--auth {
  display: grid;
  align-items: center;
  min-height: 82vh;
}

.ficha--auth {
  padding: 1.4rem 1.25rem 3rem;
}

.ficha--auth .ficha__title {
  font-size: 2.6rem;
}

.ficha--auth .lede {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.invite > .stamp {
  margin: 0.4rem 0 1rem;
}

/* Tab bar: the drawer's front rail */

.tabs {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--oak-raised);
  border-top: 1px solid var(--oak-line);
}

.tabs__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: var(--tabs-h);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--chalk-soft);
  text-decoration: none;
}

.tabs__tab .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.tabs__tab.is-active {
  color: var(--brass-bright);
}

.tabs__tab.is-active .icon {
  stroke-width: 2.3;
}

.tabs__tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 2.4rem;
  height: 3px;
  background: var(--brass);
}

/* Toasts are a typed slip */

.toast {
  position: fixed;
  bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 0.75rem);
  left: 50%;
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.65rem 1.1rem;
  font-family: var(--typed);
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border-top: 3px solid var(--red-line);
  border-radius: 2px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 1rem);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error {
  color: var(--red-line);
}

@media (prefers-reduced-motion: reduce) {
  .stamp.is-new {
    animation: none;
  }

  .toast {
    transition: none;
  }

  a.card:active,
  .btn:active {
    transform: none;
  }
}
