:root {
  color-scheme: light;
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #35332e;
  background: #f6f4ee;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

.studio {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.scene,
.card {
  min-width: 0;
  border: 1px solid #dbd6cb;
  border-radius: 24px;
  box-shadow: 0 5px 15px -12px #57453155;
}

.scene {
  display: block;
  height: 56vh;
  height: 56svh;
  overflow: hidden;
  isolation: isolate;
}
.scene:not(:defined) { background: #ede1d6; }

.card {
  padding: 24px clamp(18px, 5.15vw, 32px) 20px;
  background: #fffcf6;
}

.profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.portrait {
  flex: none;
  display: grid;
  place-items: center;
  width: 60px;
  aspect-ratio: 1;
  background: #eee7d9;
  border-radius: 50%;
}

.portrait svg { width: 89%; height: 89%; }
.intro { min-width: 0; }
.intro h1, .intro p, .coat h2 { margin: 0; }
.intro h1 {
  font-size: 2.5rem;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: .025em;
}
.intro p {
  margin-block-start: 5px;
  color: #6d665c;
  font-size: 1rem;
  line-height: 1.6;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block-start: 24px;
}

.action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 69px;
  padding: 9px 3px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
}

.action svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.call { color: #724730; background: #f0dfcc; border-color: #e6d2bb; }
.feed { color: #485740; background: #e5eadc; border-color: #d5ddca; }
.pet  { color: #714f4b; background: #f1e3df; border-color: #e7d4cf; }

.coat {
  margin-block-start: 24px;
  padding-block-start: 18px;
  border-block-start: 1px solid #e0dacf;
}
.coat h2 {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: .09em;
  line-height: 1.5;
}
.palettes { margin-block-start: 8px; }
.palette {
  display: grid;
  grid-template-columns: minmax(2.5em, 1fr) repeat(4, minmax(44px, 1fr));
  align-items: center;
  min-height: 48px;
}

.region {
  color: #686258;
  font-size: .9375rem;
  letter-spacing: .055em;
  white-space: nowrap;
}

.swatch {
  position: relative;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.swatch::before {
  content: "";
  width: 29px;
  height: 29px;
  background: var(--swatch);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #51433524;
}
.swatch[aria-pressed="true"]::before {
  outline: 1.5px solid #5d574d;
  outline-offset: 3px;
}
.swatch[aria-pressed="true"]::after {
  position: absolute;
  content: "";
  width: 9px;
  height: 5px;
  border-inline-start: 2px solid var(--check);
  border-block-end: 2px solid var(--check);
  transform: translateY(-1px) rotate(-45deg);
}

button:focus-visible { outline: 2px solid #5b4c3c; outline-offset: 2px; }
button:disabled { opacity: .56; cursor: default; }
button:enabled:active { transform: scale(.95); filter: brightness(.94); }
@media (hover: hover) {
  .action:enabled:hover { filter: brightness(.96); }
  .swatch:enabled:hover::before { box-shadow: inset 0 0 0 2px #51433554; }
}
@media (max-width: 345px) {
  .profile { gap: 10px; }
  .portrait { width: 47px; }
  .intro p { font-size: .9375rem; }
}
@media (min-width: 760px) and (orientation: landscape) {
  .studio {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(298px, .9fr) minmax(0, 1.85fr);
    grid-template-rows: minmax(max-content, auto);
    align-content: center;
    gap: clamp(16px, 1.8vw, 25px);
    padding: 32px clamp(24px, 3.8vw, 48px);
  }
  .scene, .card { border-radius: 28px; }
  .scene {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-height: clamp(560px, 76svh, 710px);
    height: auto;
  }
  .card {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 2.8vw, 38px);
  }
  .profile { flex-direction: column; align-items: start; gap: 19px; }
  .portrait { width: 68px; }
  .intro h1 { font-size: 3.25rem; }
  .intro p { margin-block-start: 9px; }
  .actions { gap: 7px; margin-block-start: 26px; }
  .action { min-height: 73px; }
  .coat { margin-block-start: 26px; padding-block-start: 23px; }
  .palettes { margin-block-start: 10px; }
  .palette { min-height: 50px; }
}
