*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
}

body {
  background: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--paper-top) 0%, var(--paper) 35%, var(--paper-deep) 100%);
}

#app {
  min-height: 100vh;
  padding: calc(var(--safe-top) + 22px) var(--gutter) calc(var(--safe-bottom) + 28px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--blue);
  text-underline-offset: 2px;
}

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

.page {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.kicker {
  font-size: var(--fs-small);
  color: var(--text-soft);
}

.title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 4px 0 6px;
  overflow-wrap: anywhere;
}

.title--big {
  font-size: var(--fs-big);
  margin: 6px 0 14px;
}

.name {
  color: var(--red);
  font-weight: 600;
}

.sep {
  margin: 0 0.08em 0 0.02em;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

.btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--line-strong);
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms var(--ease);
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn--primary {
  border: 0;
  background: linear-gradient(var(--red-top), var(--red-deep));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--danger {
  background: none;
  color: var(--red-deep);
  border-color: var(--red-line);
}

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

.btn--big {
  min-height: 48px;
  border-radius: 12px;
  font-size: var(--fs-row);
}

.btn--link {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 0 4px;
  min-height: 44px;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: var(--fs-small);
  color: var(--text-soft);
}

.input {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 16px;
  padding: 0 12px;
  color: var(--text);
}

.input:focus-visible,
.btn:focus-visible,
.btn--link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.input[aria-invalid='true'] {
  border-color: var(--red-deep);
  border-width: 2px;
}

.field__error {
  font-size: var(--fs-small);
  color: var(--red-deep);
  display: flex;
  align-items: center;
  gap: 5px;
}

.form__message {
  min-height: 20px;
  font-size: var(--fs-small);
  color: var(--red-deep);
}

.form__message:empty {
  min-height: 0;
}

.notice {
  font-size: var(--fs-small);
  color: var(--text-soft);
  background: var(--well);
  border-radius: 8px;
  padding: 10px 12px;
}

.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 24px);
  transform: translateX(-50%);
  z-index: 40;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--surface);
  font-size: var(--fs-small);
  animation: toast-in 200ms var(--ease) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
