:root {
  --paper: #f8f1e3;
  --paper-deep: #efe0c4;
  --ink: #192724;
  --muted: #6f7971;
  --line: rgba(25, 39, 36, 0.16);
  --panel: rgba(255, 251, 240, 0.92);
  --jade: #1f7a5a;
  --cinnabar: #b6402a;
  --gold: #b98a3d;
  --shadow: 0 18px 42px rgba(53, 38, 24, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: Georgia, "Songti SC", serif;
  letter-spacing: 0;
}

h1 {
  margin-top: 4px;
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(24px, 8vw, 34px);
  line-height: 1.08;
}

.eyebrow {
  color: var(--jade);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.app-shell {
  height: 100%;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
}

.app-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  width: min(100%, 460px);
  height: 100%;
  margin: 0 auto;
  border: 0;
  background: var(--paper);
  box-shadow: none;
}

.app-card.home-active {
  gap: 0;
}

.workflow-chrome {
  display: none;
}

.workflow-chrome[hidden] {
  display: none;
}

.back-button {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 18px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 240, 0.82);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.back-button[hidden] {
  display: none;
}

.meter {
  height: 6px;
  margin: 0 18px;
  overflow: hidden;
  background: rgba(25, 39, 36, 0.09);
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 420ms ease;
}

.step-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  list-style: none;
}

.step-dots li {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(25, 39, 36, 0.22);
  transition: width 240ms ease, background 240ms ease;
}

.step-dots li.active {
  width: 28px;
  background: var(--cinnabar);
}

.scene-window {
  min-height: 0;
  overflow: hidden;
}

.scene-track {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  height: 100%;
  transition: transform 360ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.scene {
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 18px 18px;
}

.app-card:not(.home-active) .scene {
  padding-top: 66px;
}

@media (min-width: 860px) {
  .app-shell {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .app-card {
    max-height: 820px;
  }
}
