.page {
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-family: var(--font, 'Arial'), sans-serif;
  font-variation-settings: 'wght' var(--normal, 410);
  font-size: 18px;
  background: var(
      --gradient,
      repeating-linear-gradient(
        180deg,
        #d3d3d3 0 2px,
        rgb(211 211 211 / 0) 2px 4px
      ),
      repeating-linear-gradient(
        90deg,
        #d3d3d3 0 2px,
        rgb(211 211 211 / 0) 2px 4px
      ),
      linear-gradient(180deg, #e7e7e7 0%, #e7e7e7 0.01%, #1a1a1a 100%)
    )
    #fff center / cover fixed;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  inline-size: var(--block-width, clamp(23.4375rem, 16.2852rem + 30.5164vw, 43.75rem));
  margin: 98px auto;
  padding-block: var(--padding-header, clamp(7.625rem, 7.0481rem + 2.4615vw, 8.125rem));
  padding-block-end: var(--padding-header, clamp(7.625rem, 7.0481rem + 2.4615vw, 8.125rem));
  font-family: var(--font-accent, 'PressStart2P', 'Arial'), fantasy;
  text-transform: uppercase;
  background-color: #fff;
  border: 2px solid currentColor;
}

.header-logo {
  font-size: var(--logo-size, clamp(3.0625rem, 1.9087rem + 4.9231vw, 4.0625rem));
}

.header-title {
  font-size: var(--title-size, clamp(0.875rem, 0.226rem + 2.7692vw, 1.4375rem));
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 51px;
}

.card {
  background-color: #fff;
  border: 2px solid currentColor;
  width: var(--block-width, clamp(23.4375rem, 16.2852rem + 30.5164vw, 43.75rem));
  overflow: hidden;
}

.main-title {
  padding: 4px 10px;
  font-variation-settings: 'wght' var(--bold, 715);
  font-size: inherit;
}

.img-wrapper {
  position: relative;
  overflow: hidden;
}

.card-img {
  display: block;
  inline-size: var(--block-width, clamp(23.4375rem, 16.2852rem + 30.5164vw, 43.75rem));
  object-fit: cover;
  object-position: right;
  aspect-ratio: 1 / 1;
}

.grayfilter {
  filter: grayscale(0.75);
}

.saturate {
  filter: saturate(400%);
}

.hue-rotate {
  filter: hue-rotate(30deg);
}

.negative {
  filter: invert(0.8);
}

.sepia {
  filter: sepia(90%);
}

.blur {
  filter: blur(0.6em);
}

.multi {
  filter: blur(0.15rem) hue-rotate(100deg) contrast(45%) saturate(130%);
}

.img-label {
  position: absolute;
  top: 25px;
  right: 25px;
  font-family: var(--font-accent, 'PressStart2P', 'Arial'), fantasy;
  font-size: 14px;
  text-transform: uppercase;
  opacity: 50%;
  mix-blend-mode: hard-light;
  text-shadow: -1px 0 #fff, 1px 0 #fff, 0 1px #fff, 0 -1px #fff;
}

@supports ((text-stroke: 1px #fff) or (-webkit-text-stroke: 1px #fff)) {
  .img-label {
    -webkit-text-stroke: 1px #fff;
    text-stroke: 1px #fff;
    text-shadow: none;
  }
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 25px;
  line-height: 21px;
}

.button-wrapper {
  display: flex;
  align-self: end;
  align-items: center;
  gap: 5px;
}

.card__icon-button {
  background-color: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: border 0.3s ease;
  overflow: visible;
  height: 38px;
}

.card__icon-button:focus {
  outline: none;
}

.card__icon-button:focus-visible {
  border-color: currentColor;
}

.button {
  position: relative;
  background-color: #fff;
  border: 2px solid currentColor;
  font-family: var(--font-accent, 'PressStart2P', 'Arial'), fantasy;
  font-size: 14px;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.button__text {
  position: relative;
  color: #fff;
  mix-blend-mode: difference;
}

.button:focus {
  outline: none;
}

.button:focus-visible {
  box-shadow: 2px 2px 0 #000;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #000;
  scale: 0 1;
  transition: scale 0.5s ease-in-out;
  transform-origin: left center;
}

.button:hover::before {
  scale: 1;
}

.card__like-button {
  padding: 10px 0;
  min-inline-size: 130px;
}

.button-floppy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px;
  margin-block-end: 55px;
  min-inline-size: clamp(19.125rem, 18.4868rem + 2.723vw, 20.9375rem);
}

.button-floppy svg {
  mix-blend-mode: difference;
}

.contour {
  transition: fill 0.1s linear;
}

.main-body {
  transition: fill 0.3s linear;
}

.core {
  transition: fill 0.3s linear 0.03s;
}

.sparks {
  opacity: 0;
}

.like-icon:hover .core {
  fill: var(--contour-color, #000);
  transition: fill 0.3s linear 0s;
}

.like-icon:hover .main-body {
  fill: var(--contour-color, #000);
  transition: fill 0.3s linear 0.05s;
}

.like-icon:active .core {
  fill: var(--animation-fill-color, #ff0000);
  transition: fill 0.3s linear 0s;
}

.like-icon:active .main-body {
  fill: var(--animation-fill-color, #ff0000);
  transition: fill 0.3s linear 0.05s;
}

.like-icon.is-liked .heart {
  animation: scale 0.3s ease-in 0.1s;
  transform-origin: center;
}

.like-icon.is-liked .contour {
  fill: var(--animation-fill-color, #ff0000);
  transition: fill 0.3s linear 0.06s;
}

.like-icon.is-liked .main-body {
  fill: var(--animation-fill-color, #ff0000);
  transition: fill 0.3s linear 0.05s;
}

.like-icon.is-liked .core {
  fill: var(--animation-fill-color, #ff0000);
  transition: fill 0.3s linear 0s;
}

.like-icon.is-liked .sparks {
  animation: shine 0.3s ease-in 0.3s;
}

.popup-save {
  inline-size: clamp(21.3125rem, 21.0484rem + 1.1268vw, 22.0625rem);
  padding: 30px;
  font-family: var(--font-accent, 'PressStart2P', 'Arial'), fantasy;
  font-size: 14px;
  line-height: 150%;
  text-transform: uppercase;
}

.popup-save[open] {
  display: grid;
  row-gap: 30px;
  grid-template-columns: 59px auto;
}

.popup-save[open] .button {
  grid-column: span 2;
  padding: 10px 0;
}

.popup-save[open] .button__text {
  text-transform: uppercase;
}

.popup-save[open] svg {
  align-self: center;
  mix-blend-mode: difference;
}

.popup-save::backdrop {
  background-color: rgb(0 0 0 / 0.75);
}

@media (width <= 500px) {
  .button-floppy {
    flex-direction: column;
    padding: 17px 18px;
  }

  .button-floppy svg {
    width: 28px;
    height: 28px;
  }
}
