.ppk-calc {
  --pc-ink: #fff;
  --pc-soft: rgba(255, 255, 255, 0.72);
  --pc-crimson: #8e1533;
  --pc-crimson-hi: #a3193c;
  --pc-line: rgba(255, 255, 255, 0.12);
  --pc-control: #2a3145;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4.4vw, 64px);
  color: var(--pc-ink);
  font-family: 'Exo 2', 'Segoe UI', sans-serif;
}

.ppk-calc__controls { display: grid; gap: 36px; align-content: center; }

.ppk-calc__field label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ppk-calc__row {
  display: grid;
  grid-template-columns: 44px 1fr 44px 3ch;
  align-items: center;
  gap: 14px;
}

.ppk-calc__count {
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: right;
}

.ppk-calc__rate { margin: 10px 0 0; font-size: 15px; color: var(--pc-soft); }

.ppk-calc__step {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--pc-control);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s linear, transform 0.15s ease-out;
}
.ppk-calc__step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ppk-calc__step:hover { background: var(--pc-crimson); box-shadow: none; }
.ppk-calc__step:active { transform: scale(0.94); }

.ppk-calc input[type='range'] {
  --fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.ppk-calc input[type='range']::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--pc-crimson-hi) var(--fill), rgba(255, 255, 255, 0.14) var(--fill));
}
.ppk-calc input[type='range']::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.ppk-calc input[type='range']::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--pc-crimson-hi); }
.ppk-calc input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--pc-crimson);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease-out;
}
.ppk-calc input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--pc-crimson);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.5);
}
.ppk-calc input[type='range']:active::-webkit-slider-thumb { transform: scale(1.12); }
.ppk-calc input[type='range']:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 10px; }
.ppk-calc__step:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.ppk-calc__result { display: grid; align-content: start; gap: 16px; }
.ppk-calc__result-label { margin: 0; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }

.ppk-calc__plate {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 16px;
  background: radial-gradient(120% 130% at 0% 0%, #a81b3f 0%, #8e1533 46%, #6a0f27 100%);
}
.ppk-calc__total {
  display: block;
  font-weight: 600;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.ppk-calc__lines { margin: 0; display: grid; }
.ppk-calc__lines > div {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--pc-line);
}
.ppk-calc__lines dt { font-size: 16px; color: var(--pc-soft); }
.ppk-calc__lines dd { margin: 0; font-weight: 600; font-size: 17px; white-space: nowrap; }
.ppk-calc__year dt { color: var(--pc-ink); font-weight: 600; }
.ppk-calc__year dd { font-size: 22px; letter-spacing: -0.02em; }

.ppk-calc__note { max-width: 46ch; margin: 0; font-size: 15px; line-height: 1.4; color: var(--pc-soft); }

.ppk-calc__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

@media (max-width: 860px) {
  .ppk-calc { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ppk-calc__row { grid-template-columns: 40px 1fr 40px 2.6ch; gap: 8px; }
  .ppk-calc__step { width: 40px; height: 40px; }
  .ppk-calc__field label { font-size: 17px; }
  .ppk-calc__count { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ppk-calc__step, .ppk-calc input[type='range']::-webkit-slider-thumb { transition: none; }
}
