:root {
  color-scheme: light dark;
  --a-plain-button-high: 44px;
  --between-the-foots-parts: 6px;
  --between-approve-and-cancel: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --label: #000;
  --on-label: #fff;
  --secondary: rgba(60, 60, 67, 0.6);
  --tertiary: rgba(60, 60, 67, 0.3);
  --separator: rgba(60, 60, 67, 0.29);
  --behind-the-sheet: #e0e0e0;
  --plain-ground: #fff;
  --set-in-the-ground: #f5f5f7;
  --sheet: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.46));
  --sheet-edge:
    0 14px 44px rgba(0, 0, 0, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.06),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.6);
  --glass-on-glass: rgba(255, 255, 255, 0.62);
  --glass-on-glass-edge: inset 0 0 0 0.5px rgba(0, 0, 0, 0.06), inset 0 1px 0.5px rgba(255, 255, 255, 0.9);
  --wide-button: linear-gradient(180deg, rgba(58, 58, 62, 0.94), rgba(0, 0, 0, 0.9));
  --wide-button-edge:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.4),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.14),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.12);
  --app-icon-paper: linear-gradient(180deg, #fff, #e9e9ee);
  --app-icon-edge: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  --agent-without-a-logo: #1c1c1c;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.3, 1.45, 0.5, 1);
  --pop: cubic-bezier(0.2, 1.35, 0.35, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --label: #fff;
    --on-label: #000;
    --secondary: rgba(235, 235, 245, 0.6);
    --tertiary: rgba(235, 235, 245, 0.3);
    --separator: rgba(84, 84, 88, 0.6);
    --behind-the-sheet: #000;
    --plain-ground: #000;
    --set-in-the-ground: #1c1c1e;
    --sheet: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    --sheet-edge:
      inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
      inset 0 1px 0.5px rgba(255, 255, 255, 0.22),
      inset 0 -1px 0.5px rgba(255, 255, 255, 0.06);
    --glass-on-glass: rgba(255, 255, 255, 0.08);
    --glass-on-glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08), inset 0 1px 0.5px rgba(255, 255, 255, 0.12);
    --wide-button: linear-gradient(180deg, #fff, #dcdce1);
    --wide-button-edge:
      0 8px 22px rgba(0, 0, 0, 0.5),
      inset 0 1px 0.5px #fff,
      inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
    --app-icon-edge: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.16);
    --agent-without-a-logo: #2c2c2e;
  }
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --pop: linear(0, 0.29 5%, 0.72 11%, 1.01 17%, 1.13 23%, 1.14 28%, 1.09 35%, 1.02 44%, 0.99 53%, 0.99 63%, 1 78%, 1);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.shown-late {
  visibility: hidden;
  animation: shown-late 0s linear 4s forwards;
}

@keyframes shown-late {
  to {
    visibility: visible;
  }
}

html {
  background: var(--behind-the-sheet);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.approval-page {
  touch-action: manipulation;
}

body {
  margin: 0;
  font: 17px/22px var(--font);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
}

.sheet {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  bottom: 8px;
  left: calc(env(safe-area-inset-left, 0px) + 8px);
  display: flex;
  flex-direction: column;
  margin: auto;
  overflow: hidden;
  border-radius: 38px;
  background: var(--sheet);
  box-shadow: var(--sheet-edge);
  animation: sheet-in 0.55s var(--pop) backwards;
}

@media (min-width: 500px) {
  .sheet {
    max-width: 414px;
    max-height: 780px;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(60px) scale(0.96);
    opacity: 0;
  }
}

.sheet > section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.step {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px;
}

.welcome {
  --beside-the-circle: 300px;
  --circle: clamp(48px, calc(85vh - var(--beside-the-circle)), 176px);
  --circle: clamp(48px, calc(85svh - var(--beside-the-circle)), 176px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
  text-align: center;
}

.welcome.with-cases {
  --beside-the-circle: 420px;
}

.circle {
  flex: none;
  display: block;
  width: var(--circle);
  height: var(--circle);
  margin-bottom: calc(var(--circle) * 0.17);
  overflow: visible;
  animation: circle-in 0.9s var(--pop) backwards;
}

@keyframes circle-in {
  from {
    transform: scale(0.5) rotate(-120deg);
    opacity: 0;
  }
}

.circle .dashes {
  fill: none;
  stroke: var(--label);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 11 29.84;
  transform-origin: 100px 100px;
  animation: circle-turn 28s linear infinite;
  transition: stroke-dasharray 0.35s var(--ease-out);
}

@keyframes circle-turn {
  to {
    transform: rotate(1turn);
  }
}

.circle .fill {
  fill: var(--label);
  transform-origin: 100px 100px;
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}

.circle .tick {
  fill: none;
  stroke: var(--on-label);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.15s;
}

.circle.ticked .dashes {
  stroke-dasharray: 40.84 0;
}

.circle.ticked .fill {
  transform: scale(1);
  transition: transform 0.4s var(--spring) 0.12s;
}

.circle.ticked .tick {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s var(--ease-out) 0.3s;
}

p {
  text-wrap: balance;
  text-wrap: pretty;
}

h1 {
  margin: 0 0 8px;
  font: 700 28px/34px var(--font);
  letter-spacing: 0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 span {
  white-space: nowrap;
}

.held-to-two-lines {
  display: -webkit-inline-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  margin: -0.12em 0;
  padding: 0.12em 0;
  overflow: hidden;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

h1.name {
  font-size: 40px;
  line-height: 46px;
}

.line {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 23px;
  color: var(--secondary);
  overflow-wrap: anywhere;
}

.welcome .line {
  max-width: 290px;
}

.welcome .line:last-child {
  margin-bottom: 0;
}

.asked {
  padding-top: 0;
  padding-bottom: 0;
  -webkit-mask-image: linear-gradient(to top, transparent, #000 8px);
  mask-image: linear-gradient(to top, transparent, #000 8px);
}

.asked > .pair {
  margin-top: 56px;
}

.asked > .facts {
  margin-bottom: 24px;
}

.line.says-what-to-do {
  color: var(--label);
}

.asked .line + .line {
  margin-top: -8px;
}

.pair {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
}

.pair .app,
.pair .agent {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.pair .app {
  border-radius: 10px;
  background: var(--app-icon-paper);
  box-shadow: var(--app-icon-edge);
}

.pair .app svg {
  width: 100%;
  height: 100%;
}

.pair .agent {
  border-radius: 50%;
  background: var(--agent-without-a-logo);
}

.pair .agent svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.pair .agent.known {
  border-radius: 0;
  background: none;
}

.pair .agent img {
  width: 42px;
  height: 42px;
  border-radius: 23%;
  box-shadow: var(--app-icon-edge);
}

.pair .between {
  display: flex;
  gap: 5px;
}

.pair .between span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tertiary);
}

.case,
.facts {
  width: 100%;
  border-radius: 22px;
  background: var(--glass-on-glass);
  box-shadow: var(--glass-on-glass-edge);
  text-align: left;
}

.case {
  padding: 14px 16px;
}

.case + .case {
  margin-top: 12px;
}

.case h2 {
  margin: 0 0 2px;
  font: 600 17px/22px var(--font);
}

.case p {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  color: var(--label);
}

.facts {
  flex: none;
  margin: 0;
  padding: 2px 16px;
}

.facts div {
  padding: 10px 0;
}

.facts div + div {
  border-top: 0.5px solid var(--separator);
}

.facts dt {
  font-size: 13px;
  line-height: 1.3847;
  color: var(--secondary);
}

.facts dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.3334;
  overflow-wrap: anywhere;
}

.foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--between-the-foots-parts);
  padding: 12px 20px 20px;
}

.foot > div {
  display: contents;
}

.step > .foot {
  margin: auto -4px -4px;
  padding: 24px 0 0;
}

.foot > .facts {
  width: auto;
  margin: 0 4px 7px;
}

.keeps-its-foot::after {
  content: "";
  flex: 0 1 20px;
}

.no-room {
  display: none;
}

.approval-page[data-room^="cancel-alone"] .no-room {
  order: 1;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  display: block;
  margin: 0;
  padding: 0 24px 6px;
  font-size: 15px;
  line-height: 20px;
  text-align: center;
  color: var(--label);
}

.approval-page[data-room^="cancel-alone"] .keeps-its-foot > .foot {
  order: 2;
}

.approval-page[data-room^="cancel-alone"] .keeps-its-foot::after {
  order: 3;
}

.approval-page[data-room^="cancel-alone"] .asked + .foot > .facts,
.approval-page[data-room^="cancel-alone"] .asked + .foot > .button:not(.plain) {
  display: none;
}

.approval-page[data-room^="cancel-alone"] .asked + .foot > .button.plain {
  align-self: flex-start;
  width: max(calc(50% - var(--between-approve-and-cancel) / 2), min(100%, 144px));
  margin-top: 0;
}

.approval-page[data-room^="cancel-alone"] .on-a-fingers-screen-wider-than-high,
.approval-page[data-room^="cancel-alone"] .on-a-fingers-screen-not-wider-than-high {
  display: none;
}

.approval-page[data-room^="cancel-alone"]:not([data-says="cannot-tell"]) .says-list-cannot-tell,
.approval-page[data-room^="cancel-alone"][data-says="cannot-tell"] .says-there-is-too-little-room {
  display: none;
}

@media (pointer: coarse) and (hover: none) {
  .approval-page[data-room^="cancel-alone"] .on-a-fingers-screen-not-wider-than-high {
    display: inline;
  }

  .approval-page[data-room^="cancel-alone"] .anywhere-else {
    display: none;
  }
}

@media (pointer: coarse) and (hover: none) and (orientation: landscape) {
  .approval-page[data-room^="cancel-alone"] .on-a-fingers-screen-wider-than-high {
    display: inline;
  }

  .approval-page[data-room^="cancel-alone"] .on-a-fingers-screen-not-wider-than-high {
    display: none;
  }
}

.approval-page[data-room$="-tight"] .sheet {
  top: calc(env(safe-area-inset-top, 0px) + 2px);
  bottom: 2px;
  padding-top: 0;
  padding-bottom: 0;
}

.approval-page[data-room="less-side-room"] .asked + .foot,
.approval-page[data-room="in-a-row-tight"] .asked + .foot {
  padding-right: 2px;
  padding-left: 2px;
}

.approval-page[data-room="less-side-room"] .asked + .foot > .facts,
.approval-page[data-room="in-a-row-tight"] .asked + .foot > .facts {
  width: calc(100% - 4px);
  margin-right: 2px;
  margin-left: 2px;
  padding-right: 6px;
  padding-left: 6px;
}

.approval-page[data-room^="in-a-row"] .asked + .foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--between-approve-and-cancel);
}

.approval-page[data-room^="in-a-row"] .asked + .foot > .facts {
  grid-column: 1 / -1;
}

.approval-page[data-room^="in-a-row"] .asked + .foot > .button {
  grid-row: 2;
  grid-column: 2;
  min-width: min-content;
  margin: 0;
}

.approval-page[data-room^="in-a-row"] .asked + .foot > .button.plain {
  grid-column: 1;
}

.approval-page[data-room="in-a-row-tight"] .asked + .foot {
  row-gap: 4px;
  padding-top: 2px;
}

.approval-page[data-room="in-a-row-tight"] .asked + .foot > .facts {
  margin-bottom: 2px;
}

.approval-page[data-room="in-a-row-tight"] .asked + .foot > .facts div {
  padding-top: 4px;
  padding-bottom: 4px;
}

.approval-page[data-room="cancel-alone-tight"] .keeps-its-foot::after {
  flex-basis: 0;
}

.approval-page[data-room="cancel-alone-tight"] .no-room {
  max-height: 47px;
  max-height: calc(round(down, 100% - var(--a-plain-button-high) - 4px, 15px) + 2px);
  margin: 2px 0 0;
  padding: 0 4px 2px;
  font-size: 12px;
  line-height: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.approval-page[data-room="cancel-alone-tight"] .asked + .foot {
  padding-top: 0;
}

.asked + .foot {
  flex-flow: column wrap;
  align-content: flex-start;
  column-gap: 40px;
  max-height: 100%;
  padding-bottom: 0;
  overflow: hidden;
  overflow: clip;
}

.asked + .foot > .facts {
  width: calc(100% - 8px);
}

.asked + .foot > .button {
  margin-bottom: calc(var(--a-plain-button-high) + var(--between-approve-and-cancel));
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.asked + .foot > .button.plain {
  margin-top: calc(0px - var(--a-plain-button-high) - var(--between-the-foots-parts));
  margin-bottom: 0;
}

.button {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--wide-button);
  box-shadow: var(--wide-button-edge);
  font: 600 17px/22px var(--font);
  color: var(--on-label);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--spring), opacity 0.2s;
}

.button:active {
  transform: scale(0.97);
}

.button:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 3px;
}

.button:disabled {
  opacity: 0.3;
  cursor: default;
}

.button.plain {
  height: var(--a-plain-button-high);
  background: none;
  box-shadow: none;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: var(--label);
}

.button.plain:active {
  transform: none;
  opacity: 0.5;
}

@media (min-width: 700px) {
  html {
    background: var(--plain-ground);
  }

  main.sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none;
    max-height: none;
    padding: 48px 24px;
    overflow-y: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: page-in 0.4s var(--ease-out) backwards;
  }

  main.sheet > * {
    flex: none;
    width: 100%;
    max-width: 400px;
    margin-right: auto;
    margin-left: auto;
  }

  main.sheet > section,
  main.sheet > .step {
    margin-top: auto;
  }

  main.sheet > section,
  main.sheet > .foot,
  main.sheet > .step:last-child {
    margin-bottom: auto;
  }

  main.sheet .step {
    flex: none;
    overflow: visible;
  }

  @media (max-height: 500px) {
    main.sheet {
      padding-top: 8px;
      padding-bottom: 8px;
    }
  }

  main.sheet > .keeps-its-foot {
    flex: 0 1 auto;
    min-height: 0;
  }

  main.sheet .keeps-its-foot > .step {
    flex: 0 1000000 auto;
    min-height: 0;
    overflow-y: auto;
  }

  main.sheet .asked > .pair {
    margin-top: 24px;
  }

  main.sheet .asked > .facts {
    margin-bottom: 8px;
  }

  main.sheet .asked + .foot {
    padding-top: 0;
  }

  main.sheet .case,
  main.sheet .facts {
    background: var(--set-in-the-ground);
    box-shadow: none;
  }
}

@keyframes page-in {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet,
  main.sheet,
  .circle,
  .circle .dashes {
    animation: none;
  }

  .circle .dashes,
  .circle .fill,
  .circle .tick,
  .button {
    transition: none;
  }
}
