:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --ink: #16181c;
  --soft: #7b7e85;
  --line: rgba(22, 24, 28, 0.1);
  --enamel: #fbfaf6;
  --accent: #0fa596;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px 16px;
}

.plan {
  width: min(348px, 100%);
  padding: 14px 14px 12px;
  border-radius: 26px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(22, 24, 28, 0.05),
    0 1px 2px rgba(22, 24, 28, 0.06),
    0 30px 60px -30px rgba(22, 24, 28, 0.3);
}
.plan__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.plan__brand { font-size: 14px; font-weight: 660; font-stretch: 106%; letter-spacing: -0.005em; }
.plan__who { font-size: 12px; font-weight: 500; color: var(--soft); }

.arch { position: relative; margin: 2px 0 4px; }
.arch svg { display: block; width: 100%; height: auto; max-height: 46vh; overflow: visible; }
.tooth { cursor: pointer; outline: none; }
.tooth__shape { fill: var(--enamel); stroke: rgba(22, 24, 28, 0.2); stroke-width: 1.2; transition: fill 0.35s ease, stroke 0.35s ease; }
.tooth__shade { fill: rgba(22, 24, 28, 0.045); }
.tooth__groove { fill: none; stroke: rgba(22, 24, 28, 0.16); stroke-width: 1.1; stroke-linecap: round; transition: stroke 0.35s ease; }
.tooth__shine { fill: none; stroke: #ffffff; stroke-width: 1.6; stroke-linecap: round; }
.tooth__halo { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0; }
.tooth.is-todo .tooth__shape { fill: color-mix(in srgb, var(--accent) 20%, #ffffff); stroke: color-mix(in srgb, var(--accent) 70%, #ffffff); }
.tooth.is-todo .tooth__groove { stroke: color-mix(in srgb, var(--accent) 60%, transparent); }
.tooth.is-on .tooth__shape { stroke: var(--ink); }
.tooth.is-on.is-todo .tooth__shape { fill: var(--accent); stroke: color-mix(in srgb, var(--accent) 70%, #000000); }
.tooth.is-on.is-todo .tooth__groove { stroke: rgba(255, 255, 255, 0.75); }
.tooth:focus-visible .tooth__shape { stroke: var(--ink); stroke-width: 2; }

/* what the arch says, in the empty middle of the U */
.arch__say { position: absolute; left: 50%; top: 56%; width: 46%; transform: translate(-50%, -50%); display: grid; gap: 3px; text-align: center; pointer-events: none; }
.arch__kind { height: 16px; overflow: hidden; font-size: 11.5px; line-height: 16px; font-weight: 620; color: var(--accent); }
.arch__name { height: 40px; overflow: hidden; font-size: 15.5px; line-height: 20px; font-weight: 640; font-stretch: 102%; letter-spacing: -0.01em; }
.arch__say span span { display: block; }
.arch__kind.is-plain { color: var(--soft); }

.rows { position: relative; display: grid; }
.rows__thumb { position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); opacity: 0; pointer-events: none; }
.row { position: relative; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.row + .row::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 1px; background: var(--line); }
.row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.row__what { font-size: 13.5px; font-weight: 620; }
.row.is-on .row__what { color: color-mix(in srgb, var(--accent) 80%, #000000); }
.row__where { flex: 1; min-width: 0; font-size: 12px; font-weight: 480; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__price { font-size: 13.5px; font-weight: 640; }
.row--total { cursor: default; }
.row--total .row__what { flex: 1; font-weight: 520; color: var(--soft); }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-height: 430px) {
  .plan { padding: 11px 12px 8px; border-radius: 22px; }
  .arch svg { max-height: 40vh; }
  .row { height: 34px; }
  .rows__thumb { height: 34px; }
  .arch__name { font-size: 14px; line-height: 18px; height: 36px; }
}
@media (min-width: 700px) and (min-height: 500px) {
  .plan { zoom: 1.25; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .plan { zoom: 1.6; }
}
