:root {
  color-scheme: dark;
  --bg: #100b08;
  --bg-deep: #070605;
  --cream: #fff3dc;
  --muted: #cdbd9f;
  --soft: #9b8568;
  --amber: #ffad45;
  --amber-strong: #ff9a22;
  --gold: #ffd181;
  --glass: rgba(47, 31, 18, 0.47);
  --glass-soft: rgba(72, 45, 23, 0.36);
  --line: rgba(255, 190, 103, 0.26);
  --line-strong: rgba(255, 202, 126, 0.46);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 228, 184, 0.12);
  --mono: "JetBrains Mono", "IBM Plex Mono", "Berkeley Mono", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--bg-deep);
  overflow: hidden;
}

body {
  height: 100%;
  width: 100vw;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 20%, rgba(168, 87, 24, 0.32), transparent 32rem),
    radial-gradient(circle at 92% 78%, rgba(255, 144, 35, 0.28), transparent 25rem),
    linear-gradient(165deg, #080706 0%, #130c08 43%, #090807 100%);
  color: var(--cream);
  font-family: var(--mono);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: 100vw;
  max-width: 390px;
  height: 100svh;
  margin: 0 auto;
  padding: clamp(10px, 2.1svh, 18px) 10px;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: clamp(8px, 1.3svh, 12px);
}

.hero,
.glass-card,
.stats-grid {
  min-width: 0;
}

.hero {
  display: grid;
  justify-items: center;
  gap: clamp(6px, 1.1svh, 10px);
  margin-bottom: 0;
  text-align: center;
}

.poo-badge {
  display: grid;
  width: clamp(44px, 7.2svh, 58px);
  height: clamp(44px, 7.2svh, 58px);
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 214, 156, 0.18), transparent 34%),
    rgba(30, 21, 15, 0.62);
  box-shadow: 0 0 42px rgba(255, 156, 44, 0.17), inset 0 1px 0 rgba(255, 244, 223, 0.10);
  color: inherit;
  font-size: clamp(1.45rem, 3.8svh, 1.9rem);
  text-decoration: none;
}

h1 {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 0;
  font-size: clamp(1.72rem, 8vw, 2.7rem);
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-shadow: 0 0 22px rgba(255, 220, 168, 0.34);
}

h1 span:first-child {
  color: var(--cream);
}

h1 span:last-child {
  color: var(--amber);
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 213, 156, 0.11), rgba(255, 161, 52, 0.04) 42%, rgba(0, 0, 0, 0.16)),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.input-card {
  display: grid;
  gap: clamp(9px, 1.4svh, 14px);
  padding: clamp(13px, 1.8svh, 18px) clamp(14px, 4vw, 20px);
}

.form-section {
  display: grid;
  gap: clamp(5px, 0.8svh, 8px);
  min-width: 0;
}

.section-label {
  margin: 0;
  color: var(--cream);
  font-size: clamp(0.82rem, 2.7vw, 0.98rem);
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 238, 208, 0.22);
}

.amount-control,
.select-shell {
  position: relative;
  display: grid;
  min-height: clamp(42px, 6svh, 50px);
  align-items: center;
  border: 1px solid rgba(255, 213, 156, 0.22);
  border-radius: 13px;
  background: rgba(14, 11, 9, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 240, 215, 0.05);
  overflow: hidden;
}

.amount-control {
  grid-template-columns: 40% 1fr;
}

.amount-control::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  width: 1px;
  content: "";
  background: rgba(255, 213, 156, 0.22);
}

select,
input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
}

.amount-control select,
.amount-control input {
  height: clamp(42px, 6svh, 50px);
  padding: 0 14px;
  font-size: clamp(0.95rem, 4vw, 1.1rem);
}

.amount-control select {
  color: var(--cream);
  background-image:
    linear-gradient(45deg, transparent 50%, #c99a63 50%),
    linear-gradient(135deg, #c99a63 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 14px) 50%;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input[type="number"] {
  text-align: center;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.select-shell select,
.date-shell input {
  height: clamp(42px, 6svh, 50px);
  padding: 0 54px;
  font-size: clamp(0.98rem, 4.2vw, 1.14rem);
}

.crypto-shell select {
  background-image:
    linear-gradient(45deg, transparent 50%, #c99a63 50%),
    linear-gradient(135deg, #c99a63 50%, transparent 50%);
  background-position:
    calc(100% - 28px) 50%,
    calc(100% - 18px) 50%;
  background-size: 9px 9px, 9px 9px;
  background-repeat: no-repeat;
}

.coin-icon,
.calendar-icon {
  position: absolute;
  left: 22px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  pointer-events: none;
}

.coin-icon {
  border-radius: 50%;
  background: linear-gradient(145deg, #ffc15b, #ff931e);
  color: #fff6df;
  font-size: 1.12rem;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(255, 155, 34, 0.36);
}

.calendar-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #c99a63;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.date-shell input {
  position: absolute;
  inset: 0;
  z-index: 4;
  height: 100%;
  padding: 0;
  color: transparent;
  opacity: 0;
  cursor: pointer;
}

.date-display {
  display: block;
  padding: 0 54px;
  color: var(--cream);
  font-size: clamp(0.98rem, 4.2vw, 1.14rem);
  line-height: clamp(42px, 6svh, 50px);
  text-align: center;
  pointer-events: none;
}

.date-shell::after {
  position: absolute;
  right: 24px;
  width: 13px;
  height: 13px;
  border-right: 2px solid #c99a63;
  border-bottom: 2px solid #c99a63;
  content: "";
  pointer-events: none;
  transform: translateY(-4px) rotate(45deg);
}

.amount-control:focus-within,
.select-shell:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(255, 164, 55, 0.12), inset 0 1px 0 rgba(255, 240, 215, 0.08);
}

.result-card {
  position: relative;
  margin-top: 0;
  padding: clamp(14px, 1.8svh, 18px) 16px clamp(12px, 1.7svh, 16px);
  overflow: hidden;
  text-align: center;
}

.result-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 82% 9%, rgba(255, 189, 91, 0.24), transparent 38%);
  pointer-events: none;
}

.result-wrap {
  position: relative;
  display: grid;
  min-height: clamp(72px, 11svh, 100px);
  place-items: center;
  margin-top: 2px;
}

.result-value {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  color: var(--amber);
  font-size: clamp(1.75rem, 8.5vw, 2.85rem);
  font-weight: 400;
  line-height: 1;
  overflow-wrap: anywhere;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(255, 164, 55, 0.38);
}

.sparkline {
  display: none;
}

.spark-line {
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255, 171, 69, 0.45));
}

.spark-fill {
  fill: url("#lineFill");
}

.spark-dot {
  fill: #fff1cf;
  stroke: var(--amber);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255, 171, 69, 0.85));
}

.gain-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 157, 36, 0.56);
  border-radius: 999px;
  background: rgba(20, 13, 8, 0.55);
  color: var(--amber);
  font-size: clamp(0.68rem, 2.9vw, 0.82rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.status-line {
  position: relative;
  z-index: 2;
  min-height: 0;
  margin: 0;
  color: var(--soft);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-line:empty {
  display: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
}

.stat-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: clamp(70px, 10svh, 86px);
  padding: 10px 9px;
}

.stat-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 181, 81, 0.26);
  border-radius: 50%;
  background: rgba(255, 167, 52, 0.11);
  color: var(--amber);
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 238, 206, 0.08);
}

.stat-label,
.stat-value,
.stat-subtext {
  margin: 0;
}

.stat-label {
  color: var(--cream);
  font-size: clamp(0.58rem, 2.6vw, 0.72rem);
  line-height: 1.2;
}

.stat-value {
  margin-top: 5px;
  color: var(--cream);
  font-size: clamp(0.62rem, 2.85vw, 0.84rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.stat-subtext {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(0.52rem, 2.3vw, 0.62rem);
  line-height: 1.25;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 430px) {
  .app-shell {
    max-width: none;
  }

  .input-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .amount-control {
    grid-template-columns: 40% 1fr;
  }

  .amount-control::after {
    left: 40%;
  }

  .amount-control select,
  .amount-control input,
  .select-shell select,
  .date-shell input,
  .date-display {
    font-size: clamp(0.92rem, 4.1vw, 1.08rem);
  }

  .result-card {
    padding-right: 16px;
    padding-left: 16px;
  }

}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}



@supports not ((backdrop-filter: blur(22px)) or (-webkit-backdrop-filter: blur(22px))) {
  .glass-card,
  .poo-badge {
    background-color: rgba(34, 22, 14, 0.94);
  }
}
