:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #17181d;
  --soft: rgba(23, 24, 29, 0.56);
  --line: rgba(23, 24, 29, 0.08);
  --field: #f4f4f6;
  --accent: #3b6cff;
  --stop: #e5484d;
}

*, *::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: 8px 10px;
}

.wd { --tone: var(--accent); position: relative; width: min(308px, 100%); padding: 14px 14px 12px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23, 24, 29, 0.05), 0 30px 50px -32px rgba(30, 50, 130, 0.5); }
.wd.is-over { --tone: var(--stop); }
.wd__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.wd__head h2 { font-size: 16px; line-height: 22px; font-weight: 740; font-stretch: 102%; letter-spacing: -0.01em; }
.wd__head p { font-size: 12px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.wd__head b { font-weight: 720; color: var(--ink); }

.wd__amount { display: flex; align-items: center; gap: 2px; height: 56px; margin-top: 8px; padding: 0 14px; border-radius: 17px; background: var(--field); box-shadow: inset 0 0 0 1.500px transparent; cursor: text; transition: box-shadow 0.2s, background-color 0.2s; }
.wd__amount:focus-within, .wd__amount.is-focus { background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--tone), 0 0 0 4px color-mix(in srgb, var(--tone) 13%, transparent); }
.wd__cur { font-size: 22px; font-weight: 700; color: var(--soft); }
.wd__amount input { flex: 1 1 auto; min-width: 0; width: 100%; height: 56px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 32px; font-weight: 740; font-stretch: 95%; letter-spacing: -0.02em; outline: none; caret-color: var(--tone); }

.wd__bar { position: relative; height: 6px; margin: 10px 2px 0; border-radius: 3px; background: rgba(23, 24, 29, 0.07); overflow: hidden; }
.wd__out { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 3px; background: var(--tone); transform-origin: 0 50%; transform: scaleX(0); transition: background-color 0.25s; }

.wd__pills { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 36px; margin-top: 10px; padding: 3px; border-radius: 14px; background: var(--field); }
.wd__marker { position: absolute; left: 3px; top: 3px; width: 60px; height: 30px; border-radius: 11px; background: #ffffff; box-shadow: 0 0 0 1px var(--line), 0 4px 8px -5px rgba(23, 24, 29, 0.5); opacity: 0; }
.wd__pill { position: relative; height: 30px; border: 0; border-radius: 11px; background: none; color: var(--soft); font: inherit; font-size: 13px; font-weight: 680; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; transition: color 0.2s; }
.wd__pill[aria-pressed="true"] { color: var(--ink); }
.wd__pill:focus-visible, .wd__go:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.wd__lines { display: grid; gap: 5px; margin-top: 12px; padding: 0 2px; }
.wd__lines div { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.500px; line-height: 17px; white-space: nowrap; }
.wd__lines dt { font-weight: 560; color: var(--soft); }
.wd__lines dd { font-weight: 660; }
.wd__get { height: 17px; overflow: hidden; }
.wd__get span { display: block; }

.wd__go { position: relative; display: block; width: 100%; height: 46px; margin-top: 12px; border: 0; border-radius: 16px; background: var(--ink); color: #ffffff; font: inherit; font-size: 14.500px; font-weight: 720; cursor: pointer; outline: none; overflow: hidden; -webkit-tap-highlight-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 18px -12px rgba(23, 24, 29, 0.7); }
.wd__go.is-off { background: var(--field); color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.wd__gofill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 80%, #ffffff)); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.wd__golabel { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.wd__golabel svg { width: 0; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.wd__golabel path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.wd__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17181d; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(23, 24, 29, 0.3)); z-index: 5; }
