:root {
  color-scheme: light;
  --ink: #30283a;
  --muted: #766c82;
  --panel: #fff8f1;
  --panel-dark: #ead9c9;
  --cream: #fffdfa;
  --field: #ffffff;
  --paw: #ff7f99;
  --paw-dark: #d94e70;
  --mint: #93d9c1;
  --sky: #98c5ff;
  --gold: #f4bf5f;
  --shadow: rgba(62, 43, 71, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 127, 153, 0.24), transparent 24rem),
    radial-gradient(circle at 85% 12%, rgba(147, 217, 193, 0.3), transparent 22rem),
    linear-gradient(135deg, #f7fbff 0%, #fff4e6 52%, #f4f0ff 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  width: min(100%, 37rem);
  padding: 1rem;
}

.calculator {
  position: relative;
  padding: 1.25rem;
  border: 2px solid rgba(48, 40, 58, 0.1);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, var(--panel), #fffdf9);
  box-shadow: 0 1.6rem 3.5rem var(--shadow);
}

.calculator::before,
.calculator::after {
  content: "";
  position: absolute;
  top: -1rem;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.1rem 100% 1.1rem 100%;
  background: var(--panel);
  border: 2px solid rgba(48, 40, 58, 0.1);
  z-index: -1;
}

.calculator::before {
  left: 2.2rem;
  transform: rotate(-26deg);
}

.calculator::after {
  right: 2.2rem;
  transform: rotate(116deg);
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.5rem;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.45rem, 8vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.brand p {
  margin: 0.4rem 0 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  margin-left: auto;
  min-width: 6.65rem;
  min-height: 2.35rem;
  border: 1px solid rgba(48, 40, 58, 0.1);
  border-radius: 99rem;
  background: #fff;
  color: var(--paw-dark);
  cursor: pointer;
  font: 850 0.78rem / 1 Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 0.18rem 0 var(--panel-dark);
}

.sound-toggle[aria-pressed="true"] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.sound-cat-icon {
  position: relative;
  width: 1.9rem;
  height: 1.28rem;
  flex: 0 0 1.9rem;
}

.sound-cat-face,
.sound-cat-ear,
.sound-cat-eye,
.sound-cat-mouth,
.sound-cat-fluff,
.sound-wave,
.sound-muted-line {
  position: absolute;
  display: block;
}

.sound-cat-face {
  left: 0;
  bottom: 0.02rem;
  width: 1.04rem;
  height: 0.88rem;
  border: 0.12rem solid currentColor;
  border-radius: 48% 48% 42% 42%;
  background: #fff;
}

.sound-cat-ear {
  top: 0.03rem;
  width: 0.46rem;
  height: 0.46rem;
  border: 0.12rem solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0.1rem 0.2rem 0.08rem 0.2rem;
  background: #fff;
}

.sound-cat-ear-left {
  left: 0.05rem;
  transform: rotate(28deg);
}

.sound-cat-ear-right {
  left: 0.53rem;
  transform: rotate(62deg);
}

.sound-cat-eye {
  top: 0.32rem;
  width: 0.11rem;
  height: 0.11rem;
  border-radius: 99rem;
  background: currentColor;
}

.sound-cat-eye-left {
  left: 0.25rem;
}

.sound-cat-eye-right {
  left: 0.58rem;
}

.sound-cat-mouth {
  left: 0.37rem;
  bottom: 0.18rem;
  width: 0.22rem;
  height: 0.13rem;
  border-bottom: 0.08rem solid currentColor;
  border-radius: 0 0 99rem 99rem;
}

.sound-cat-fluff {
  top: 0.2rem;
  width: 0.2rem;
  height: 0.32rem;
  border-radius: 99rem;
  background: currentColor;
  opacity: 0;
}

.sound-cat-fluff-left {
  left: -0.05rem;
  transform: rotate(-28deg) scaleY(0.4);
}

.sound-cat-fluff-right {
  right: -0.05rem;
  transform: rotate(28deg) scaleY(0.4);
}

.sound-wave {
  border: 0.13rem solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0 99rem 99rem 0;
}

.sound-wave-one {
  right: 0.55rem;
  top: 0.45rem;
  width: 0.22rem;
  height: 0.32rem;
}

.sound-wave-two {
  right: 0.29rem;
  top: 0.34rem;
  width: 0.42rem;
  height: 0.56rem;
  opacity: 0.72;
}

.sound-wave-three {
  right: 0.01rem;
  top: 0.2rem;
  width: 0.66rem;
  height: 0.84rem;
  opacity: 0.48;
}

.sound-muted-line {
  right: 0.22rem;
  top: 0.12rem;
  width: 0.13rem;
  height: 1.04rem;
  border-radius: 99rem;
  background: currentColor;
  opacity: 0;
  transform: rotate(-45deg);
}

.sound-muted-line-two {
  transform: rotate(45deg);
}

.sound-toggle[aria-pressed="true"] .sound-wave {
  opacity: 0.2;
}

.sound-toggle[aria-pressed="true"] .sound-muted-line {
  opacity: 1;
}

.sound-toggle.is-purr-happy .sound-cat-icon {
  animation: happy-purr-icon 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-face {
  animation: fluffy-face 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-ear-left {
  animation: happy-left-ear 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-ear-right {
  animation: happy-right-ear 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-eye {
  animation: happy-eye 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-mouth {
  animation: happy-mouth 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-cat-fluff {
  animation: fluff-pop 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-wave {
  animation: sound-wave-pop 820ms ease both;
}

.sound-toggle.is-purr-happy .sound-wave-two {
  animation-delay: 50ms;
}

.sound-toggle.is-purr-happy .sound-wave-three {
  animation-delay: 100ms;
}

.sound-toggle.is-purr-happy .sound-muted-line {
  animation: mute-x-pop 360ms ease both;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(48, 40, 58, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.58);
}

.profile-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.profile-card strong {
  display: block;
  margin-top: 0.18rem;
  font-size: 1.1rem;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.cat-mark {
  position: relative;
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
}

.face,
.ear {
  position: absolute;
  display: block;
}

.face {
  inset: 0.65rem 0.2rem 0.15rem;
  border-radius: 48% 48% 42% 42%;
  background: var(--gold);
  box-shadow: inset -0.45rem -0.35rem rgba(143, 84, 45, 0.12);
}

.ear {
  top: 0.3rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.35rem 100% 0.35rem 100%;
  background: var(--gold);
}

.ear-left {
  left: 0.45rem;
  transform: rotate(-16deg);
}

.ear-right {
  right: 0.45rem;
  transform: rotate(106deg);
}

.eye,
.nose,
.whisker {
  position: absolute;
  display: block;
  background: var(--ink);
}

.eye {
  top: 1.45rem;
  width: 0.42rem;
  height: 0.72rem;
  border-radius: 99rem;
}

.eye-left {
  left: 1.25rem;
}

.eye-right {
  right: 1.25rem;
}

.nose {
  top: 2.18rem;
  left: 50%;
  width: 0.5rem;
  height: 0.34rem;
  border-radius: 60% 60% 90% 90%;
  transform: translateX(-50%);
  background: var(--paw-dark);
}

.whisker {
  width: 1.15rem;
  height: 0.1rem;
  border-radius: 99rem;
  opacity: 0.7;
}

.whisker-left-1 {
  top: 2.25rem;
  left: 0.25rem;
  transform: rotate(9deg);
}

.whisker-left-2 {
  top: 2.62rem;
  left: 0.25rem;
  transform: rotate(-8deg);
}

.whisker-right-1 {
  top: 2.25rem;
  right: 0.25rem;
  transform: rotate(-9deg);
}

.whisker-right-2 {
  top: 2.62rem;
  right: 0.25rem;
  transform: rotate(8deg);
}

.judge-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.field,
.range-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field input {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 3.15rem;
  border: 2px solid rgba(48, 40, 58, 0.1);
  border-radius: 0.95rem;
  background: var(--field);
  color: var(--ink);
  font: 750 1rem / 1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  outline: none;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 0.22rem 0 var(--panel-dark);
}

select {
  appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23766c82' d='M1 1.25 6 6.75 11 1.25z'/%3E%3C/svg%3E")
      calc(100% - 1rem) 50% / 0.75rem 0.5rem no-repeat,
    var(--field);
  padding-right: 2.2rem;
}

input:focus,
select:focus {
  border-color: rgba(255, 127, 153, 0.65);
  box-shadow: 0 0.22rem 0 var(--paw), 0 0 0 0.22rem rgba(255, 127, 153, 0.13);
}

.input-prefix {
  position: relative;
  display: block;
}

.currency-prefix {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  z-index: 1;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 850;
  transform: translateY(-50%);
  pointer-events: none;
}

.money-field input {
  padding-left: 2.35rem;
}

input[type="range"] {
  min-height: 2rem;
  padding: 0;
  box-shadow: none;
  accent-color: var(--paw);
}

#impulse-label {
  color: var(--paw-dark);
  font-size: 0.9rem;
}

.judge-button {
  min-height: 3.4rem;
  border: 0;
  border-radius: 1rem;
  background: var(--paw);
  color: #fff;
  box-shadow: 0 0.35rem 0 var(--paw-dark), 0 0.75rem 1.1rem rgba(217, 78, 112, 0.2);
  cursor: pointer;
  font: 850 1.1rem / 1 Inter, ui-sans-serif, system-ui, sans-serif;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.judge-button:hover {
  transform: translateY(-0.08rem);
}

.judge-button:active {
  transform: translateY(0.22rem);
  box-shadow: 0 0.12rem 0 var(--paw-dark), 0 0.35rem 0.7rem rgba(217, 78, 112, 0.18);
}

.result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, rgba(152, 197, 255, 0.18), transparent),
    #2f2938;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.verdict {
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.result p {
  margin: 0.8rem 0 0;
  color: rgba(255, 253, 250, 0.78);
  font-size: 1rem;
  line-height: 1.45;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.metrics div {
  min-width: 0;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
}

.metrics dt {
  color: rgba(255, 253, 250, 0.63);
  font-size: 0.72rem;
  font-weight: 800;
}

.metrics dd {
  margin: 0.28rem 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.context-card {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.75rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
}

.context-card[hidden] {
  display: none;
}

.context-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.context-card span,
.context-card dt {
  color: rgba(255, 253, 250, 0.63);
  font-size: 0.72rem;
  font-weight: 850;
}

.context-card strong {
  color: #fff;
  font-size: 1rem;
}

.context-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.context-card dd {
  margin: 0.22rem 0 0;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 900;
}

.context-card p {
  margin: 0;
  color: rgba(255, 253, 250, 0.75);
  font-size: 0.84rem;
  line-height: 1.35;
}

.negotiation {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.negotiation[hidden] {
  display: none;
}

.negotiation-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
}

.negotiation-head strong {
  font-size: 1rem;
  line-height: 1.15;
}

.negotiation-head span,
.negotiation label span {
  color: rgba(255, 253, 250, 0.66);
  font-size: 0.76rem;
  font-weight: 800;
}

.negotiation-note {
  margin: -0.3rem 0 0;
  color: rgba(255, 253, 250, 0.72);
  font-size: 0.82rem;
  line-height: 1.4;
}

.negotiation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.negotiation label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.negotiation input,
.negotiation select {
  min-height: 2.75rem;
  border-color: rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

.negotiation .currency-prefix {
  color: rgba(255, 253, 250, 0.72);
}

.negotiation select {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23fffdfa' fill-opacity='.72' d='M1 1.25 6 6.75 11 1.25z'/%3E%3C/svg%3E")
      calc(100% - 1rem) 50% / 0.75rem 0.5rem no-repeat,
    rgba(255, 255, 255, 0.1);
}

.negotiation option {
  color: var(--ink);
}

.negotiate-button,
.rebel-button {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: 850 0.98rem / 1 Inter, ui-sans-serif, system-ui, sans-serif;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.rebel-button {
  margin-top: 0.8rem;
}

.negotiate-button {
  background: rgba(147, 217, 193, 0.22);
}

.negotiate-button:hover,
.rebel-button:hover {
  background: rgba(255, 127, 153, 0.34);
  transform: translateY(-0.06rem);
}

.scratch-attack {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(47, 41, 56, 0);
}

.scratch-attack.is-active {
  animation: attack-backdrop 1150ms ease both;
}

.attack-cat {
  position: relative;
  width: min(82vw, 26rem);
  aspect-ratio: 1 / 0.72;
  transform: translateY(105vh) scale(0.65);
}

.scratch-attack.is-active .attack-cat {
  animation: cat-lunge 1150ms cubic-bezier(0.15, 0.88, 0.24, 1) both;
}

.attack-face,
.attack-ear,
.attack-eye,
.attack-nose,
.attack-mouth {
  position: absolute;
  display: block;
}

.attack-face {
  inset: 9% 7% 0;
  border-radius: 48% 48% 38% 38%;
  background: var(--gold);
  box-shadow: inset -1.2rem -1rem rgba(143, 84, 45, 0.12), 0 2rem 3rem rgba(0, 0, 0, 0.22);
}

.attack-ear {
  top: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 1.2rem 100% 1.2rem 100%;
  background: var(--gold);
}

.attack-ear-left {
  left: 1.8rem;
  transform: rotate(-18deg);
}

.attack-ear-right {
  right: 1.8rem;
  transform: rotate(108deg);
}

.attack-eye {
  top: 38%;
  width: 3.6rem;
  height: 0.7rem;
  border-radius: 99rem;
  background: var(--ink);
}

.attack-eye-left {
  left: 24%;
  transform: rotate(8deg);
}

.attack-eye-right {
  right: 24%;
  transform: rotate(-8deg);
}

.attack-nose {
  top: 52%;
  left: 50%;
  width: 2.3rem;
  height: 1.4rem;
  border-radius: 55% 55% 90% 90%;
  transform: translateX(-50%);
  background: var(--paw-dark);
}

.attack-mouth {
  top: 66%;
  left: 50%;
  width: 5rem;
  height: 1.2rem;
  border-bottom: 0.35rem solid var(--ink);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%) rotate(180deg);
}

.scratch {
  position: fixed;
  top: 17vh;
  width: 0.55rem;
  height: 72vh;
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0.4rem rgba(255, 255, 255, 0.9),
    0.4rem 0.2rem 0 rgba(255, 127, 153, 0.5);
  opacity: 0;
  transform: rotate(16deg) scaleY(0);
  transform-origin: top;
}

.scratch-attack.is-active .scratch {
  animation: scratch-swipe 720ms ease 260ms both;
}

.scratch-one {
  left: 34%;
}

.scratch-two {
  left: 50%;
  animation-delay: 330ms;
}

.scratch-three {
  left: 66%;
  animation-delay: 400ms;
}

.scratch-attack p {
  position: fixed;
  left: 50%;
  bottom: 8vh;
  width: min(92vw, 42rem);
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 18vw, 8rem);
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateX(-50%) translateY(1rem) rotate(-4deg);
}

.feedback-panel,
.history-panel {
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(48, 40, 58, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
}

.feedback-panel {
  display: grid;
  gap: 0.8rem;
}

.feedback-panel strong,
.history-head strong {
  font-size: 1rem;
}

.feedback-panel p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.feedback-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.feedback-actions button,
.history-head button {
  min-height: 2.45rem;
  border: 0;
  border-radius: 0.75rem;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 0.18rem 0 var(--panel-dark);
  cursor: pointer;
  font: 800 0.82rem / 1 Inter, ui-sans-serif, system-ui, sans-serif;
}

.feedback-actions button:hover,
.history-head button:hover {
  background: #fff2f5;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.history-head button {
  min-height: 2.2rem;
  padding: 0 0.75rem;
  color: var(--muted);
}

#history-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

#history-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
}

#history-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.history-badge {
  border-radius: 99rem;
  background: rgba(147, 217, 193, 0.28);
  color: #286553;
  padding: 0.35rem 0.5rem;
  font-weight: 850;
}

.scratch-attack.is-active p {
  animation: nope-pop 700ms ease 380ms both;
}

.calculator.happy .cat-mark {
  animation: purr 420ms ease;
}

.calculator.purr-return .cat-mark {
  animation: pleased-cat-bounce 920ms ease both;
}

.calculator.purr-return .face {
  animation: pleased-face 920ms ease both;
}

.calculator.purr-return .ear-left {
  animation: pleased-left-ear 920ms ease both;
}

.calculator.purr-return .ear-right {
  animation: pleased-right-ear 920ms ease both;
}

.calculator.purr-return .eye {
  animation: pleased-eyes 920ms ease both;
}

.calculator.purr-return .whisker {
  animation: pleased-whiskers 920ms ease both;
}

.calculator.skeptical .eye {
  height: 0.22rem;
  top: 1.7rem;
}

.calculator.eye-roll .eye {
  height: 0.8rem;
  background: #fff;
  border: 0.12rem solid var(--ink);
  animation: roll-eyes 850ms ease both;
}

.calculator.eye-roll .eye::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  right: 0.02rem;
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 50%;
  background: var(--ink);
}

@keyframes roll-eyes {
  0%,
  100% {
    transform: translateY(0);
  }
  35%,
  70% {
    transform: translateY(-0.08rem);
  }
}

@keyframes purr {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-0.08rem) rotate(-2deg);
  }
  75% {
    transform: translateX(0.08rem) rotate(2deg);
  }
}

@keyframes pleased-cat-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  34% {
    transform: translateY(-0.16rem) scale(1.08) rotate(-2deg);
  }
  58% {
    transform: translateY(0.05rem) scale(0.98) rotate(1deg);
  }
  76% {
    transform: translateY(-0.05rem) scale(1.02) rotate(0deg);
  }
}

@keyframes pleased-face {
  0%,
  100% {
    border-radius: 48% 48% 42% 42%;
    box-shadow: inset -0.45rem -0.35rem rgba(143, 84, 45, 0.12);
  }
  36%,
  68% {
    border-radius: 55% 55% 48% 48%;
    box-shadow:
      inset -0.45rem -0.35rem rgba(143, 84, 45, 0.08),
      0 0.18rem 0 rgba(255, 127, 153, 0.18),
      0 0 0 0.18rem rgba(244, 191, 95, 0.22);
  }
}

@keyframes pleased-left-ear {
  0%,
  100% {
    transform: rotate(-16deg);
  }
  38% {
    transform: rotate(-24deg) translateY(-0.08rem);
  }
}

@keyframes pleased-right-ear {
  0%,
  100% {
    transform: rotate(106deg);
  }
  38% {
    transform: rotate(114deg) translateY(-0.08rem);
  }
}

@keyframes pleased-eyes {
  0%,
  100% {
    height: 0.72rem;
    top: 1.45rem;
    border-radius: 99rem;
  }
  34%,
  68% {
    height: 0.18rem;
    top: 1.62rem;
    border-radius: 99rem;
  }
}

@keyframes pleased-whiskers {
  0%,
  100% {
    opacity: 1;
  }
  34%,
  68% {
    opacity: 0.78;
  }
}

@keyframes happy-purr-icon {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-0.05rem) scale(1.08);
  }
  58% {
    transform: translateY(0.02rem) scale(0.98);
  }
}

@keyframes fluffy-face {
  0%,
  100% {
    border-radius: 48% 48% 42% 42%;
    box-shadow: none;
  }
  36% {
    border-radius: 54% 54% 48% 48%;
    box-shadow:
      -0.1rem 0.03rem 0 #fff,
      0.1rem 0.03rem 0 #fff,
      0 0.12rem 0 rgba(255, 127, 153, 0.18);
  }
}

@keyframes happy-left-ear {
  0%,
  100% {
    transform: rotate(28deg);
  }
  38% {
    transform: rotate(18deg) translateY(-0.03rem);
  }
}

@keyframes happy-right-ear {
  0%,
  100% {
    transform: rotate(62deg);
  }
  38% {
    transform: rotate(72deg) translateY(-0.03rem);
  }
}

@keyframes happy-eye {
  0%,
  100% {
    height: 0.11rem;
    border-radius: 99rem;
  }
  35%,
  62% {
    height: 0.04rem;
    border-radius: 99rem;
  }
}

@keyframes happy-mouth {
  0%,
  100% {
    width: 0.22rem;
    transform: translateX(0);
  }
  42% {
    width: 0.34rem;
    transform: translateX(-0.05rem);
  }
}

@keyframes fluff-pop {
  0%,
  100% {
    opacity: 0;
  }
  32%,
  62% {
    opacity: 0.28;
  }
}

@keyframes sound-wave-pop {
  0% {
    opacity: 0;
    transform: scaleX(0.45);
  }
  42% {
    opacity: 1;
    transform: scaleX(1.15);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes mute-x-pop {
  0% {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(-45deg) scale(0.2);
  }
}

@keyframes attack-backdrop {
  0%,
  100% {
    opacity: 0;
    background: rgba(47, 41, 56, 0);
  }
  18%,
  82% {
    opacity: 1;
    background: rgba(47, 41, 56, 0.32);
  }
}

@keyframes cat-lunge {
  0% {
    transform: translateY(105vh) scale(0.65);
  }
  22% {
    transform: translateY(4vh) scale(1.08) rotate(-2deg);
  }
  58% {
    transform: translateY(2vh) scale(1.02) rotate(2deg);
  }
  100% {
    transform: translateY(105vh) scale(0.75) rotate(0deg);
  }
}

@keyframes scratch-swipe {
  0% {
    opacity: 0;
    transform: rotate(16deg) scaleY(0);
  }
  18%,
  68% {
    opacity: 1;
    transform: rotate(16deg) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: rotate(16deg) scaleY(1);
  }
}

@keyframes nope-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem) scale(0.86) rotate(-4deg);
  }
  35%,
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1) rotate(-4deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.4rem) scale(1.04) rotate(-4deg);
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 0.75rem;
  }

  .calculator {
    padding: 1rem;
    border-radius: 1.35rem;
  }

  .field-grid,
  .metrics,
  .context-card dl,
  .negotiation-grid,
  .feedback-actions,
  .profile-card {
    grid-template-columns: 1fr;
  }

  .brand h1 {
    font-size: 1.75rem;
  }

  .sound-toggle {
    width: 100%;
    margin-left: 0;
  }
}
