@font-face {
  font-family: "Roboto Serif";
  src: url("RobotoSerif-VariableFont_GRAD,opsz,wdth,wght.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Kripa";
  src: url("Kripa-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Kapakana";
  src: url("Kapakana-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #381b13;
  --paper: #ededed;
  --canvas: #e1e0cc;
  --card: #e4e4e4;
  --muted: #a4a4a4;
  font-family: "Roboto Serif", Georgia, serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--canvas);
  cursor: url("Cursor.svg") 0 0, auto;
}

button,
a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.social-link,
.inquire-link,
.tab-button,
.buy-link {
  cursor: url("Cursor.svg") 0 0, pointer;
}

a:focus-visible,
button:focus-visible,
.content-panel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px 16px 46px;
}

.profile-card {
  display: flex;
  width: min(394px, calc(100vw - 32px));
  height: min(640px, calc(100svh - 82px));
  min-height: 470px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(56 27 19 / 12%);
  border-radius: 68px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgb(56 27 19 / 12%);
}

.profile-header {
  flex: 0 0 auto;
  padding: 29px 28px 0;
  text-align: center;
}

.profile-picture {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 9px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgb(56 27 19 / 20%);
}

h1 {
  margin: 0;
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 41px;
  font-variation-settings: "GRAD" 25, "opsz" 144, "wdth" 50, "wght" 140;
  font-weight: 140;
  line-height: 1.15;
}

.subtitle {
  margin: 5px 0 0;
  font-family: "Kripa", Georgia, serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.12;
}

.social-links {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.social-link {
  display: grid;
  width: 17px;
  height: 22px;
  place-items: center;
  transition: transform 160ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.etsy-link img {
  width: 15px;
  height: 17px;
}

.inquire-link {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 5px;
  padding: 4px 11px 4px 8px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--canvas);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 16px;
  font-variation-settings: "GRAD" 25, "opsz" 144, "wdth" 50, "wght" 300;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.inquire-link:hover {
  transform: translateY(-2px);
  background: #522a20;
}

.inquire-link img {
  display: block;
  width: 17px;
  height: 14px;
}

.tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 19px;
}

.tab-button {
  position: relative;
  padding: 6px 0 13px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Kripa", Georgia, serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
}

.tab-underline {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}

.tab-button.is-active .tab-underline {
  transform: scaleX(1);
  transition: transform 450ms ease-out;
}

.content-panel {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cfcfcf transparent;
  scrollbar-width: thin;
  margin: 12px 18px 55px 22px;
  padding: 0 9px 2px 0;
}

.content-panel::-webkit-scrollbar {
  width: 8px;
}

.content-panel::-webkit-scrollbar-track {
  border-radius: 8px;
  background: rgb(0 0 0 / 2%);
}

.content-panel::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #cfcfcf;
}

.product-list {
  display: grid;
  gap: 9px;
}

.product-status {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: "Kripa", Georgia, serif;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.product-status.is-error {
  color: var(--ink);
}

.product-card {
  position: relative;
  display: grid;
  min-height: 110px;
  grid-template-columns: 101px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 22px;
  background: var(--card);
  transform-origin: center;
}

.product-card.is-attention {
  animation: gentle-shake 3.8s ease-in-out infinite;
}

.product-thumbnail {
  display: block;
  width: 101px;
  height: 101px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ink);
  object-fit: cover;
}

.product-details {
  min-width: 0;
}

.product-name {
  overflow: hidden;
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-category {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  padding: 2px 5px 2px 3px;
  border-radius: 9px;
  background: #d0d0d0;
  color: var(--muted);
  font-family: "Kripa", Georgia, serif;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category img {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
}

.product-price {
  font-family: "Kripa", Georgia, serif;
  font-size: 13px;
  font-weight: 300;
}

.buy-link {
  display: inline-flex;
  min-width: 39px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--canvas);
  font-family: "Kripa", Georgia, serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.buy-link:hover {
  transform: translateY(-1px);
  background: #522a20;
}

.about-panel {
  padding: 0 10px 8px 7px;
}

.about-copy {
  margin: 0;
  font-family: "Kripa", Georgia, serif;
  font-size: 15px;
  line-height: 1.2;
  text-align: justify;
  white-space: pre-line;
}

.about-copy::first-letter {
  float: left;
  margin: 2px 7px 0 -7px;
  font-family: "Kapakana", cursive;
  font-size: 4.4em;
  line-height: 0.9;
}

.checkerboard {
  position: fixed;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 35px;
  background-color: var(--paper);
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(-45deg, var(--ink) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--ink) 75%),
    linear-gradient(-45deg, transparent 75%, var(--ink) 75%);
  background-position:
    0 0,
    0 17px,
    17px -17px,
    -17px 0;
  background-size: 35px 35px;
}

@keyframes gentle-shake {
  0%,
  88%,
  100% {
    transform: translateX(0) rotate(0);
  }
  90% {
    transform: translateX(-2px) rotate(-0.35deg);
  }
  92% {
    transform: translateX(2px) rotate(0.35deg);
  }
  94% {
    transform: translateX(-2px) rotate(-0.35deg);
  }
  96% {
    transform: translateX(1px) rotate(0.2deg);
  }
  98% {
    transform: translateX(0) rotate(0);
  }
}

@media (max-width: 440px) {
  .stage {
    padding: 12px 12px 43px;
  }

  .profile-card {
    width: min(394px, calc(100vw - 24px));
    height: min(640px, calc(100svh - 55px));
    min-height: 450px;
    border-radius: 56px;
  }

  .profile-header {
    padding: 24px 22px 0;
  }

  .profile-picture {
    width: 88px;
    height: 88px;
    margin-bottom: 7px;
  }

  h1 {
    font-size: 37px;
  }

  .subtitle {
    font-size: 14px;
  }

  .tabs {
    gap: 24px;
    margin-top: 15px;
  }

  .content-panel {
    margin: 9px 14px 39px 17px;
    padding-right: 7px;
  }

  .product-card {
    min-height: 103px;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 10px;
  }

  .product-thumbnail {
    width: 90px;
    height: 90px;
  }
}

@media (max-height: 560px) {
  .profile-card {
    min-height: 0;
    border-radius: 42px;
  }

  .profile-header {
    padding-top: 15px;
  }

  .profile-picture {
    width: 70px;
    height: 70px;
  }

  h1 {
    font-size: 32px;
  }

  .social-links {
    margin-top: 5px;
  }

  .tabs {
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
