@font-face {
  font-family: "ChosunilboMyungjo";
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/Chosunilbo_myungjo.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f8f1e4;
  --paper-deep: #efe1cc;
  --ink: #5e4634;
  --muted: #847263;
  --line: rgba(75, 56, 42, 0.18);
  --sage: #9eb49a;
  --rose: #c98693;
  --citrus: #e8b75b;
  --sky: #8db8b8;
  --cedar: #8f6a52;
  --shadow: 0 24px 70px rgba(80, 54, 31, 0.16);
  --space-bg: rgba(169, 154, 216, 0.28);
  --space-mist: rgba(142, 191, 186, 0.26);
  --space-light: rgba(232, 183, 91, 0.24);
  --image-filter: saturate(0.9) contrast(0.96) brightness(1.04);
  --image-paper-wash: linear-gradient(180deg, rgba(255, 252, 246, 0.18), rgba(239, 225, 206, 0.1));
  --image-grain: repeating-linear-gradient(0deg, rgba(82, 61, 43, 0.026) 0 1px, transparent 1px 7px);
  --paper-fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.055' numOctaves='5' seed='12'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.72 0 0 0 0 0.70 0 0 0 0 0.66 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='180' height='180' fill='%23fbfaf4'/%3E%3Crect width='180' height='180' filter='url(%23paper)' opacity='0.55'/%3E%3C/svg%3E");
  --heading-ink: #513827;
  --title-ink: #5d4331;
  --text-ink: #756455;
  --display-font: "ChosunilboMyungjo", "Playfair Display", "Bodoni Moda", "Times New Roman", serif;
  --body-font: "ChosunilboMyungjo", "Cormorant Garamond", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(226, 174, 142, 0.28), transparent 26rem),
    radial-gradient(circle at 88% 22%, rgba(152, 186, 156, 0.24), transparent 24rem),
    linear-gradient(110deg, #fbf5e9 0%, var(--paper) 48%, #f3eadb 100%);
  font-family: var(--body-font);
  overflow-x: hidden;
}

.intro-wash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #fbfaf4;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  pointer-events: none;
  animation: introFadeOut 1200ms ease forwards;
  will-change: opacity, visibility;
}

.intro-wash canvas {
  width: 100%;
  height: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(rgba(88, 68, 48, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 68, 48, 0.035) 1px, transparent 1px);
  background-size: 5px 7px, 8px 6px;
}

.cursor-wash {
  position: fixed;
  width: 150px;
  height: 150px;
  left: 0;
  top: 0;
  z-index: 25;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  filter: blur(18px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 134, 147, 0.24), rgba(232, 183, 91, 0.12) 46%, transparent 72%);
  transition: opacity 220ms ease;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 58px);
  background: linear-gradient(rgba(248, 241, 228, 0.86), rgba(248, 241, 228, 0.48));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(83, 58, 37, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  color: var(--muted);
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.main-nav a {
  padding: 8px 0;
}

.sound-toggle,
.dialog-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.62);
  color: var(--ink);
  cursor: pointer;
}

.sound-toggle {
  grid-auto-flow: column;
  gap: 3px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.sound-toggle span {
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.sound-toggle span:nth-child(1) {
  height: 10px;
}

.sound-toggle span:nth-child(2) {
  height: 18px;
}

.sound-toggle span:nth-child(3) {
  height: 13px;
}

.sound-toggle[aria-pressed="true"] span {
  animation: soundBars 900ms ease-in-out infinite alternate;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 112px clamp(20px, 6vw, 92px) 82px;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 4vh -4vw auto auto;
  width: min(78vw, 1180px);
  height: min(82vh, 820px);
  object-fit: cover;
  object-position: center;
  opacity: 0.74;
  filter: saturate(0.9) contrast(0.98) brightness(1.03);
  mask-image: radial-gradient(circle at 58% 48%, #000 0 48%, rgba(0, 0, 0, 0.64) 64%, transparent 84%);
  transform-origin: 58% 54%;
  animation: heroArtDrift 18s ease-in-out infinite alternate;
  will-change: transform, opacity, filter;
}

.hero-breeze {
  position: absolute;
  inset: 4vh -4vw auto auto;
  width: min(78vw, 1180px);
  height: min(82vh, 820px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.62;
  filter: saturate(1.02) contrast(1);
  mask-image: radial-gradient(circle at 56% 46%, #000 0 54%, rgba(0, 0, 0, 0.5) 70%, transparent 86%);
}

.breeze-fragment {
  position: absolute;
  inset: 0;
  display: block;
  background-image: url("assets/scent-landscape-watercolor.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.78;
  transform-origin: 50% 92%;
  will-change: transform;
}

.breeze-lavender {
  clip-path: ellipse(14% 32% at 31% 43%);
  transform-origin: 31% 76%;
  animation: botanicalSwayA 7.2s ease-in-out infinite alternate;
}

.breeze-herb {
  clip-path: ellipse(12% 27% at 57% 43%);
  transform-origin: 56% 74%;
  animation: botanicalSwayB 8.4s ease-in-out infinite alternate;
}

.breeze-eucalyptus {
  clip-path: ellipse(15% 31% at 84% 29%);
  transform-origin: 82% 72%;
  animation: botanicalSwayC 7.8s ease-in-out infinite alternate;
}

.breeze-wood {
  clip-path: ellipse(22% 18% at 77% 76%);
  transform-origin: 68% 88%;
  animation: botanicalSwayD 9.6s ease-in-out infinite alternate;
}

.hero-essence {
  position: absolute;
  right: clamp(16px, 7vw, 112px);
  top: 50%;
  z-index: 1;
  width: min(46vw, 620px);
  aspect-ratio: 1.08;
  transform: translateY(-48%);
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.essence-wash,
.essence-line {
  position: absolute;
  display: block;
}

.essence-wash {
  border-radius: 48% 52% 55% 45% / 52% 42% 58% 48%;
  filter: blur(3px);
  opacity: 0.58;
  animation: scentBloom 10s ease-in-out infinite alternate;
}

.essence-wash-a {
  left: 4%;
  top: 20%;
  width: 48%;
  aspect-ratio: 1.22;
  background: radial-gradient(circle at 42% 44%, rgba(169, 154, 216, 0.5), rgba(169, 154, 216, 0.18) 48%, transparent 72%);
}

.essence-wash-b {
  right: 4%;
  top: 10%;
  width: 44%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 48% 42%, rgba(142, 191, 186, 0.46), rgba(142, 191, 186, 0.16) 48%, transparent 72%);
  animation-duration: 12s;
}

.essence-wash-c {
  right: 18%;
  bottom: 8%;
  width: 52%;
  aspect-ratio: 1.34;
  background: radial-gradient(circle at 48% 44%, rgba(232, 183, 91, 0.42), rgba(232, 183, 91, 0.16) 48%, transparent 72%);
  animation-duration: 14s;
}

.essence-line {
  left: 6%;
  top: 15%;
  width: 82%;
  height: 62%;
  border: 1px solid rgba(88, 63, 44, 0.18);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 52% 48% 46% 54% / 46% 54% 46% 54%;
  transform: rotate(-18deg);
  opacity: 0.58;
  animation: lineDrift 13s ease-in-out infinite alternate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  animation: riseIn 1200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow,
.postcard-kicker {
  margin: 0 0 12px;
  color: #8a6a50;
  font-family: var(--body-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 400;
  letter-spacing: 0.015em;
}

h1 {
  color: var(--heading-ink);
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.16;
  max-width: 560px;
  text-transform: none;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-copy p:not(.eyebrow) {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--text-ink);
  font-size: clamp(14px, 1.28vw, 16px);
  line-height: 1.86;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-actions,
.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-link,
.ghost-link,
.ink-button,
.ghost-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(55, 41, 31, 0.2);
  padding: 12px 22px;
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-link,
.ink-button {
  color: #fffaf2;
  background: #8b5d50;
  box-shadow: 0 18px 45px rgba(94, 61, 45, 0.22);
}

.ghost-link,
.ghost-button {
  color: var(--ink);
  background: rgba(255, 252, 245, 0.54);
}

.primary-link:hover,
.ghost-link:hover,
.ink-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.ink-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.section-preview {
  position: absolute;
  left: clamp(20px, 6vw, 92px);
  right: clamp(20px, 6vw, 92px);
  bottom: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  color: rgba(54, 42, 32, 0.68);
  font-family: var(--body-font);
  font-size: 12px;
}

.section-preview span {
  padding-top: 12px;
  border-top: 1px solid rgba(63, 46, 34, 0.22);
}

.section,
.studio-section {
  position: relative;
  padding: 104px clamp(18px, 5vw, 78px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  color: var(--heading-ink);
  font-size: clamp(23px, 2vw, 32px);
  line-height: 1.2;
  text-transform: none;
}

.section-heading p {
  color: var(--text-ink);
  font-size: 13px;
  line-height: 1.78;
}

.palette-layout,
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}

.studio-grid {
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(18px, 3vw, 34px);
}

.oil-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: clamp(12px, 2vw, 22px);
  min-height: 520px;
  align-content: start;
}

.oil-swatch {
  position: relative;
  min-height: 132px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  cursor: grab;
  isolation: isolate;
  overflow: visible;
  transition: transform 200ms ease;
}

.oil-swatch:hover {
  transform: translateY(-2px);
}

.oil-swatch:active {
  cursor: grabbing;
}

.oil-swatch::before {
  content: "";
  position: absolute;
  inset: 8px 8px 42px;
  z-index: -1;
  border-radius: 43% 57% 61% 39% / 52% 38% 62% 48%;
  background: color-mix(in srgb, var(--oil-color), #fffaf2 12%);
  filter: saturate(0.82) contrast(0.96);
  opacity: 0.74;
  box-shadow:
    inset 0 0 34px rgba(255, 255, 255, 0.36),
    inset 0 -18px 32px rgba(80, 54, 31, 0.05),
    0 18px 38px rgba(80, 54, 31, 0.08);
  transform: rotate(var(--tilt));
  transition: transform 240ms ease, opacity 240ms ease, filter 240ms ease, box-shadow 240ms ease;
}

.oil-swatch::after {
  content: "";
  position: absolute;
  inset: 18px 18px 48px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--oil-color), transparent 28%), transparent 70%);
  opacity: 0;
  transform: scale(0.68);
  transition: opacity 320ms ease, transform 480ms ease;
}

.oil-swatch:hover::before,
.oil-swatch.is-active::before {
  opacity: 0.92;
  filter: saturate(0.9) contrast(0.98);
  box-shadow:
    inset 0 0 36px rgba(255, 255, 255, 0.42),
    inset 0 -18px 32px rgba(80, 54, 31, 0.05),
    0 22px 46px rgba(80, 54, 31, 0.12);
  transform: rotate(var(--tilt)) scale(1.05);
}

.oil-swatch:hover::after,
.oil-swatch.is-active::after {
  opacity: 0.46;
  transform: scale(1.12);
}

.oil-swatch span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 8px rgba(255, 252, 246, 0.86);
  word-break: keep-all;
}

.oil-detail,
.blend-panel {
  position: sticky;
  top: 92px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 242, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.detail-illustration {
  height: 190px;
  margin-bottom: 22px;
  border-radius: 6px;
  background:
    var(--image-paper-wash),
    radial-gradient(circle at 18% 16%, color-mix(in srgb, var(--detail-color), transparent 38%), transparent 24%),
    var(--detail-image) center / cover;
  border: 1px solid rgba(78, 58, 41, 0.1);
  position: relative;
  overflow: hidden;
  filter: var(--image-filter);
}

.detail-illustration::before,
.detail-illustration::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.detail-illustration::before {
  inset: 0;
  background:
    linear-gradient(rgba(255, 252, 246, 0), rgba(255, 252, 246, 0.14)),
    var(--image-grain);
  mix-blend-mode: multiply;
}

.detail-illustration::after {
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
}

.detail-family {
  margin: 0 0 8px;
  color: #7c5d45;
  font-family: var(--body-font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.oil-detail h3 {
  color: var(--title-ink);
  font-size: 21px;
  line-height: 1.24;
  text-transform: none;
}

.oil-detail p,
.oil-detail dd,
.recipe-postcard p,
.scent-landscape p {
  color: var(--text-ink);
  font-size: 12px;
  line-height: 1.74;
  word-break: keep-all;
  overflow-wrap: normal;
}

.oil-detail dl {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.oil-detail dt {
  color: var(--title-ink);
  font-size: 12px;
  font-weight: 700;
}

.oil-detail dd {
  margin: 5px 0 0;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.scene-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(83, 58, 37, 0.13);
  border-radius: 8px;
  padding: 22px;
  color: var(--ink);
  background: var(--scene-image) center / cover;
  box-shadow: 0 16px 40px rgba(80, 54, 31, 0.09);
  cursor: pointer;
  text-align: left;
  transition: transform 260ms ease, box-shadow 260ms ease, filter 260ms ease;
}

.scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    var(--image-paper-wash),
    rgba(255, 252, 246, 0.56);
  z-index: 0;
}

.scene-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--image-grain);
  mix-blend-mode: multiply;
  opacity: 0.58;
  pointer-events: none;
}

.scene-card > * {
  position: relative;
  z-index: 1;
}

.scene-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 56px rgba(80, 54, 31, 0.14);
  filter: saturate(1.03) brightness(1.02);
}

.scene-card strong {
  color: var(--title-ink);
  font-size: 15px;
  word-break: keep-all;
}

.scene-card span {
  color: var(--text-ink);
  font-size: 12px;
  line-height: 1.62;
  max-width: 15em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.studio-section {
  background:
    radial-gradient(circle at 74% 18%, rgba(141, 184, 184, 0.18), transparent 30rem),
    linear-gradient(180deg, transparent, rgba(238, 225, 206, 0.42));
}

.studio-workbench {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.studio-oil-tray {
  position: sticky;
  top: 92px;
  max-height: calc(100svh - 118px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 242, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tray-heading {
  padding: 20px 18px 12px;
  border-bottom: 1px solid rgba(83, 58, 37, 0.1);
}

.tray-heading h3 {
  color: var(--title-ink);
  font-size: 18px;
  line-height: 1.12;
  text-transform: none;
}

.studio-oil-list {
  display: grid;
  gap: 8px;
  max-height: calc(100svh - 232px);
  overflow-y: auto;
  padding: 12px;
}

.studio-oil {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid rgba(83, 58, 37, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.5);
  cursor: grab;
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.studio-oil:hover,
.studio-oil.is-selected {
  transform: translateX(2px);
  border-color: color-mix(in srgb, var(--oil-color), #5b4635 26%);
  background: color-mix(in srgb, var(--oil-color), #fffaf2 78%);
  box-shadow: 0 10px 28px rgba(80, 54, 31, 0.08);
}

.studio-oil:active {
  cursor: grabbing;
}

.studio-oil-mark {
  width: 34px;
  height: 34px;
  border-radius: 45% 55% 58% 42% / 54% 42% 58% 46%;
  background: var(--oil-color);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.35);
  transition: transform 280ms ease, filter 280ms ease;
}

.studio-oil:hover .studio-oil-mark,
.studio-oil.is-selected .studio-oil-mark {
  transform: scale(1.08) rotate(8deg);
  filter: saturate(1.08);
}

.studio-oil-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.studio-oil-text strong {
  color: var(--title-ink);
  font-size: 11px;
}

.studio-oil-text small {
  color: var(--muted);
  font-family: var(--body-font);
  font-size: 9px;
}

.canvas-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(83, 58, 37, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 252, 246, 0.9), rgba(255, 252, 246, 0.84)),
    repeating-linear-gradient(0deg, rgba(82, 61, 43, 0.032) 0 1px, transparent 1px 7px);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

#blendCanvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.drop-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(74, 57, 44, 0.52);
  font-size: clamp(18px, 2.5vw, 34px);
  font-weight: 600;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.drop-hint.is-hidden {
  opacity: 0;
}

.blend-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.blend-chip {
  position: relative;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(83, 58, 37, 0.13);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 252, 246, 0.58);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.blend-chip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--chip-color);
  opacity: 0.56;
}

.blend-chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--chip-color), #5b4635 28%);
  box-shadow: 0 12px 28px rgba(80, 54, 31, 0.08);
}

.blend-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.blend-chip strong {
  color: var(--title-ink);
  font-size: 12px;
}

.remove-oil {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(83, 58, 37, 0.16);
  border-radius: 50%;
  color: #6a5142;
  background: rgba(255, 252, 246, 0.68);
  cursor: pointer;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.remove-oil:hover {
  color: #fffaf2;
  background: #8b5d50;
  transform: rotate(8deg);
}

.blend-chip input {
  width: 100%;
  accent-color: var(--chip-color);
}

.blend-name-row {
  display: grid;
  gap: 8px;
}

.blend-name-row label {
  color: var(--title-ink);
  font-size: 12px;
  font-weight: 700;
}

.blend-name-row input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--title-ink);
  background: transparent;
  font-family: var(--display-font);
  font-size: 18px;
  letter-spacing: 0.02em;
  outline: 0;
}

.timeline {
  margin: 28px 0;
}

.timeline-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-ink);
  font-size: 10px;
}

.timeline input {
  width: 100%;
  accent-color: #8f6a52;
}

.scent-landscape {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.landscape-image {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  min-height: 238px;
  aspect-ratio: 12 / 7;
  border-radius: 6px;
  border: 1px solid rgba(83, 58, 37, 0.13);
  background:
    var(--image-paper-wash),
    url("assets/scent-landscape-watercolor.png") center / cover;
  filter: saturate(var(--landscape-saturation, 0.92)) contrast(0.97) brightness(var(--landscape-brightness, 1));
}

.landscape-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--image-paper-wash),
    var(--image-grain);
  mix-blend-mode: multiply;
  opacity: 0.42;
  pointer-events: none;
}

.landscape-image canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 238px;
}

.recipe-postcard {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(90, 65, 45, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 252, 245, 0.86), rgba(255, 248, 235, 0.78)),
    repeating-linear-gradient(90deg, rgba(92, 68, 48, 0.035) 0 1px, transparent 1px 9px);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.16);
}

.recipe-postcard h3 {
  font-family: var(--display-font);
  color: var(--title-ink);
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: 0.015em;
  word-break: keep-all;
}

.recipe-oils {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-oil {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(84, 61, 43, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.mini-dot {
  width: 16px;
  height: 16px;
  border-radius: 50% 42% 56% 44%;
  background: var(--mini-color);
}

.recipe-meta {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.recipe-line {
  display: grid;
  grid-template-columns: 78px 1fr 42px;
  gap: 8px;
  align-items: center;
}

.recipe-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(75, 56, 42, 0.1);
}

.recipe-bar span {
  display: block;
  height: 100%;
  background: var(--bar-color);
}

.history-album {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 30px);
  min-height: 300px;
  perspective: 1200px;
}

.history-album.is-carousel {
  position: relative;
  display: block;
  min-height: 640px;
  perspective: 1400px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.history-album.is-carousel:active {
  cursor: grabbing;
}

.history-empty {
  grid-column: 1 / -1;
  padding: 56px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.history-print {
  position: relative;
  min-height: 236px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(130px, 0.68fr);
  gap: 0;
  padding: 0;
  border: 1px solid rgba(83, 58, 37, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 252, 246, 0.28), rgba(255, 252, 246, 0.92) 68%),
    var(--image-grain),
    rgba(255, 252, 246, 0.88);
  box-shadow:
    0 22px 52px rgba(80, 54, 31, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transform: rotate(var(--rotate));
  text-align: left;
  overflow: hidden;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.history-album.is-carousel .history-print {
  position: absolute;
  left: 50%;
  top: 42px;
  width: min(620px, 70vw);
  min-height: 260px;
  opacity: var(--card-opacity);
  z-index: var(--card-z);
  transform:
    translateX(-50%)
    translateY(calc(var(--slot) * 78px))
    translateZ(calc(var(--abs-slot) * -120px))
    rotateX(calc(var(--slot) * 15deg))
    rotate(calc(var(--rotate) * 0.45));
  filter: saturate(calc(1 - (var(--abs-slot) * 0.08))) brightness(calc(1 - (var(--abs-slot) * 0.04)));
}

.history-album.is-carousel .history-list,
.history-album.is-carousel .history-list * {
  cursor: auto;
  user-select: auto;
}

.history-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.history-album.is-carousel .history-list {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  margin-top: 0;
}

.history-list .postcard-kicker {
  grid-column: 1 / -1;
  margin: 0 0 2px;
}

.history-list-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(83, 58, 37, 0.12);
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  background-color: rgba(251, 250, 244, 0.78);
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.history-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(80, 54, 31, 0.1);
}

.history-list-item img {
  width: 132px;
  height: 92px;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  filter: var(--image-filter);
}

.history-list-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-list-item b {
  color: var(--title-ink);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-list-item small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-album.is-carousel .history-print.is-active {
  opacity: 1;
  box-shadow:
    0 34px 84px rgba(80, 54, 31, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.history-print::before,
.history-print::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.history-print::before {
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 6px;
}

.history-print::after {
  right: calc(26% - 1px);
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 1px;
  background: rgba(83, 58, 37, 0.12);
}

.history-print:hover {
  transform: rotate(var(--rotate)) translateY(-6px) rotateX(1.4deg);
  box-shadow:
    0 30px 70px rgba(80, 54, 31, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.history-album.is-carousel .history-print:hover {
  transform:
    translateX(-50%)
    translateY(calc((var(--slot) * 78px) - 8px))
    translateZ(calc(var(--abs-slot) * -120px))
    rotateX(calc(var(--slot) * 15deg))
    rotate(calc(var(--rotate) * 0.45));
}

.history-photo {
  position: relative;
  min-height: 236px;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 28%, var(--h1), transparent 30%),
    radial-gradient(circle at 70% 44%, var(--h2), transparent 32%),
    url("assets/scent-landscape-watercolor.png") center / cover;
  filter: var(--image-filter);
}

.history-photo img,
.dialog-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
}

.history-photo::after,
.dialog-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  opacity: 0.28;
  pointer-events: none;
}

.history-script {
  position: absolute;
  left: clamp(18px, 3vw, 34px);
  top: 50%;
  z-index: 2;
  max-width: 70%;
  color: rgba(255, 252, 246, 0.9);
  font-family: "Imperial Script", var(--display-font);
  font-size: clamp(26px, 3.3vw, 46px);
  line-height: 0.92;
  text-shadow: 0 2px 12px rgba(54, 38, 27, 0.26);
  transform: translateY(-50%) rotate(-4deg);
  word-break: keep-all;
}

.history-note {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 16px;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.78), rgba(246, 236, 219, 0.64)),
    var(--image-grain);
}

.history-thumb {
  width: 100%;
  aspect-ratio: 1.2;
  margin-bottom: 4px;
  border: 1px solid rgba(83, 58, 37, 0.14);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 252, 246, 0.42);
}

.history-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--image-filter);
}

.history-date {
  margin: 0;
  color: #8a6a50;
  font-family: var(--body-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.history-note strong {
  display: block;
  min-width: 0;
  color: var(--title-ink);
  font-size: 13px;
  line-height: 1.35;
  word-break: keep-all;
}

.history-note span {
  color: var(--muted);
  font-size: 10px;
}

.history-oils {
  display: -webkit-box;
  color: var(--text-ink);
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-dots {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.history-dots i {
  width: 13px;
  aspect-ratio: 1;
  border-radius: 50% 42% 56% 44%;
  background: var(--dot-color);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.35);
}

.history-dialog {
  width: min(1080px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background-color: #fbfaf4;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  box-shadow: 0 34px 90px rgba(41, 28, 21, 0.3);
}

.history-detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.46fr) minmax(0, 1.54fr);
  grid-template-rows: minmax(390px, 1fr) auto;
  gap: 10px;
  padding: 10px;
  background-color: #fbfaf4;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
}

.detail-ingredients,
.detail-ratios,
.detail-generated,
.detail-description {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(83, 58, 37, 0.13);
  border-radius: 8px;
  background-color: #fbfaf4;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(83, 58, 37, 0.04);
}

.detail-ingredients {
  padding: 18px 14px;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 9px;
  margin-top: 12px;
}

.ingredient-card {
  position: relative;
  min-width: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(83, 58, 37, 0.13);
  border-radius: 6px;
  background-color: #fbfaf4;
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  box-shadow: 0 10px 22px rgba(80, 54, 31, 0.08);
}

.ingredient-card img {
  display: block;
  width: 100%;
  height: 68px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  filter: var(--image-filter);
  box-shadow: none;
}

.ingredient-card::after {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: inherit;
  background-color: rgba(42, 29, 20, 0.16);
  background-image: var(--paper-fiber);
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}

.ingredient-card figcaption {
  position: absolute;
  left: 10px;
  right: 8px;
  top: 50%;
  z-index: 2;
  color: rgba(255, 252, 246, 0.94);
  font-family: "Imperial Script", var(--display-font);
  font-size: 21px;
  font-weight: 400;
  line-height: 0.95;
  text-align: left;
  text-shadow: 0 2px 10px rgba(48, 33, 23, 0.34);
  transform: translateY(-50%) rotate(-3deg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-ratios {
  align-self: stretch;
  padding: 18px 14px;
}

.detail-ratios .recipe-line {
  grid-template-columns: 56px 1fr 34px;
  gap: 6px;
  font-size: 10px;
}

.detail-ratios .recipe-bar {
  height: 6px;
}

.detail-generated {
  grid-column: 2;
  grid-row: 1;
}

.detail-generated .dialog-image {
  min-height: 100%;
  height: 100%;
  border-radius: 0;
}

.detail-description {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.58fr);
  gap: 18px;
  align-items: end;
  padding: 20px;
}

.detail-description h3 {
  color: var(--heading-ink);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.12;
}

.detail-description p {
  color: var(--text-ink);
  font-size: 12px;
  line-height: 1.72;
}

.history-dialog::backdrop {
  background: rgba(41, 30, 22, 0.42);
  backdrop-filter: blur(8px);
}

.generated-space {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background:
    radial-gradient(circle at 22% 20%, var(--space-light), transparent 28rem),
    radial-gradient(circle at 78% 28%, var(--space-mist), transparent 30rem),
    radial-gradient(circle at 48% 76%, var(--space-bg), transparent 34rem),
    var(--image-grain),
    linear-gradient(130deg, rgba(255, 250, 240, 0.95), rgba(239, 225, 206, 0.93));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 900ms ease, visibility 900ms ease;
  overflow: hidden;
}

.generated-space.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.space-mist {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 28% 46%, var(--space-bg), transparent 24rem),
    radial-gradient(circle at 68% 42%, var(--space-mist), transparent 28rem);
  filter: blur(26px);
  opacity: 0.78;
  animation: spaceBreath 9s ease-in-out infinite alternate;
}

.space-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.space-particles span {
  position: absolute;
  width: clamp(42px, 7vw, 96px);
  aspect-ratio: 1;
  border-radius: 44% 56% 58% 42% / 50% 42% 58% 50%;
  background: radial-gradient(circle, var(--space-light), transparent 68%);
  opacity: 0.42;
  filter: blur(8px);
  animation: floatingPetal 11s ease-in-out infinite alternate;
}

.space-particles span:nth-child(1) {
  left: 10%;
  top: 22%;
}

.space-particles span:nth-child(2) {
  left: 72%;
  top: 14%;
  animation-duration: 13s;
}

.space-particles span:nth-child(3) {
  left: 18%;
  top: 72%;
  animation-duration: 12s;
}

.space-particles span:nth-child(4) {
  left: 82%;
  top: 66%;
  animation-duration: 15s;
}

.space-particles span:nth-child(5) {
  left: 48%;
  top: 9%;
  animation-duration: 10s;
}

.space-particles span:nth-child(6) {
  left: 56%;
  top: 82%;
  animation-duration: 14s;
}

.image-loader {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 18px;
  color: #5f5148;
  font-weight: 700;
  text-align: center;
  transition: opacity 500ms ease, transform 500ms ease;
}

.image-loader span {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 48% 52% 50% 50%;
  background:
    radial-gradient(circle at 45% 45%, rgba(201, 134, 147, 0.6), rgba(169, 154, 216, 0.28) 42%, transparent 72%),
    radial-gradient(circle at 60% 55%, var(--space-mist), transparent 70%);
  filter: blur(4px);
  animation: loaderBloom 1600ms ease-in-out infinite alternate, watercolorTurn 5s ease-in-out infinite;
}

.generated-space.is-ready .image-loader {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.generated-frame {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - clamp(36px, 8vw, 108px)));
  max-width: 100%;
  margin: 0;
  padding: clamp(8px, 1.5vw, 16px);
  border: 1px solid rgba(83, 58, 37, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.72), rgba(246, 236, 219, 0.52)),
    var(--image-grain);
  box-shadow:
    0 34px 90px rgba(63, 43, 30, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 1000ms ease 220ms, transform 1000ms ease 220ms;
  overflow: hidden;
}

.generated-frame::before,
.generated-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.generated-frame::before {
  inset: clamp(8px, 1.5vw, 16px);
  z-index: 2;
  border-radius: 6px;
  background:
    radial-gradient(circle at 28% 36%, var(--space-bg), transparent 34%),
    radial-gradient(circle at 62% 42%, var(--space-mist), transparent 38%),
    radial-gradient(circle at 46% 72%, var(--space-light), transparent 36%),
    rgba(255, 252, 246, 0.7);
  filter: blur(2px);
  opacity: 0.96;
  transform: scale(1.04);
}

.generated-frame::after {
  inset: clamp(8px, 1.5vw, 16px);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.08), transparent 36%),
    var(--image-grain);
  mix-blend-mode: multiply;
  opacity: 0.54;
}

.generated-space.is-ready .generated-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.generated-space.is-ready .generated-frame figcaption {
  animation: captionRise 900ms ease 760ms both;
}

.generated-space.is-ready .generated-frame::before {
  animation: imageWashReveal 1600ms cubic-bezier(0.22, 0.78, 0.2, 1) 260ms forwards;
}

.generated-frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 720px);
  object-fit: cover;
  border: 1px solid rgba(83, 58, 37, 0.13);
  border-radius: 6px;
  box-shadow: 0 18px 56px rgba(63, 43, 30, 0.16);
  filter: var(--image-filter);
}

.generated-frame figcaption {
  position: relative;
  z-index: 4;
  max-width: 780px;
  margin-top: 18px;
  color: var(--text-ink);
}

.generated-frame h2 {
  color: var(--heading-ink);
  font-family: var(--display-font);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: none;
}

.stage-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(83, 58, 37, 0.18);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.7);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 22px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
}

.dialog-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 34px;
}

.dialog-image {
  position: relative;
  min-height: 360px;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 24%, var(--h1), transparent 34%),
    radial-gradient(circle at 68% 42%, var(--h2), transparent 32%),
    url("assets/scent-landscape-watercolor.png") center / cover;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introFadeOut {
  0% {
    opacity: 1;
  }
  42% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes heroArtDrift {
  0% {
    transform: translate3d(-5px, 3px, 0) scale(1.006) rotate(-0.18deg);
    filter: saturate(0.96) contrast(0.98);
  }
  50% {
    transform: translate3d(7px, -5px, 0) scale(1.018) rotate(0.12deg);
    filter: saturate(1.02) contrast(1);
  }
  100% {
    transform: translate3d(11px, 2px, 0) scale(1.026) rotate(0.22deg);
    filter: saturate(1.02) contrast(1);
  }
}

@keyframes botanicalSwayA {
  from {
    transform: translate3d(-5px, 2px, 0) rotate(-1.1deg) scale(1.004);
  }
  to {
    transform: translate3d(8px, -4px, 0) rotate(1.6deg) scale(1.018);
  }
}

@keyframes botanicalSwayB {
  from {
    transform: translate3d(3px, -3px, 0) rotate(0.9deg) scale(1.003);
  }
  to {
    transform: translate3d(-7px, 4px, 0) rotate(-1.5deg) scale(1.016);
  }
}

@keyframes botanicalSwayC {
  from {
    transform: translate3d(-4px, 5px, 0) rotate(-0.75deg) scale(1.004);
  }
  to {
    transform: translate3d(7px, -6px, 0) rotate(1.35deg) scale(1.014);
  }
}

@keyframes botanicalSwayD {
  from {
    transform: translate3d(2px, 2px, 0) rotate(0.35deg) scale(1.002);
  }
  to {
    transform: translate3d(-6px, -3px, 0) rotate(-0.9deg) scale(1.01);
  }
}

@keyframes scentBloom {
  from {
    transform: translate3d(-8px, 6px, 0) scale(0.94) rotate(-4deg);
    opacity: 0.42;
  }
  to {
    transform: translate3d(10px, -8px, 0) scale(1.08) rotate(5deg);
    opacity: 0.66;
  }
}

@keyframes lineDrift {
  from {
    transform: translate3d(-4px, 4px, 0) rotate(-20deg) scale(0.98);
  }
  to {
    transform: translate3d(8px, -8px, 0) rotate(-14deg) scale(1.03);
  }
}

@keyframes spaceBreath {
  from {
    transform: translate3d(-1.2%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(1.4%, -1%, 0) scale(1.04);
  }
}

@keyframes floatingPetal {
  from {
    transform: translate3d(-10px, 8px, 0) rotate(-4deg);
  }
  to {
    transform: translate3d(18px, -16px, 0) rotate(6deg);
  }
}

@keyframes loaderBloom {
  from {
    transform: scale(0.72) rotate(-4deg);
    opacity: 0.5;
  }
  to {
    transform: scale(1.28) rotate(5deg);
    opacity: 0.9;
  }
}

@keyframes watercolorTurn {
  0%,
  100% {
    border-radius: 48% 52% 50% 50% / 46% 50% 50% 54%;
  }
  50% {
    border-radius: 42% 58% 56% 44% / 54% 44% 56% 46%;
  }
}

@keyframes imageWashReveal {
  0% {
    opacity: 0.96;
    transform: scale(1.04);
    filter: blur(5px);
    clip-path: inset(0 0 0 0 round 6px);
  }
  62% {
    opacity: 0.44;
    transform: scale(1.01);
    filter: blur(3px);
    clip-path: inset(0 0 0 0 round 6px);
  }
  100% {
    opacity: 0;
    transform: scale(1);
    filter: blur(1px);
    clip-path: inset(0 0 100% 0 round 6px);
  }
}

@keyframes captionRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art,
  .hero-essence,
  .essence-wash,
  .essence-line,
  .breeze-fragment,
  .generated-frame::before,
  .space-mist,
  .space-particles span,
  .image-loader span {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .generated-space.is-ready .generated-frame::before {
    opacity: 0;
  }
}

@keyframes soundBars {
  to {
    transform: scaleY(0.55);
    opacity: 0.55;
  }
}

@media (max-width: 1080px) {
  .palette-layout,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .oil-detail,
  .blend-panel,
  .studio-oil-tray {
    position: relative;
    top: auto;
  }

  .studio-oil-tray,
  .studio-oil-list {
    max-height: none;
  }

  .studio-oil-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scene-grid,
  .history-album {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-print {
    grid-template-columns: minmax(0, 1.55fr) minmax(118px, 0.72fr);
  }

  .oil-palette {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    display: none;
  }

  .brand,
  .sound-toggle {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding: 76px 18px 92px;
  }

  .hero-art {
    inset: 12vh -48vw auto auto;
    width: 136vw;
    height: 58vh;
    opacity: 0.58;
  }

  .hero-breeze {
    inset: 12vh -48vw auto auto;
    width: 136vw;
    height: 58vh;
    opacity: 0.42;
  }

  .hero-essence {
    right: -20vw;
    top: 35%;
    width: 78vw;
    opacity: 0.58;
  }

  h1 {
    max-width: calc(100vw - 36px);
    font-size: clamp(31px, 8vw, 40px);
    line-height: 1.08;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero-copy p:not(.eyebrow) {
    max-width: calc(100vw - 36px);
    font-size: 12px;
    line-height: 1.74;
  }

  .scene-card span,
  .oil-detail p,
  .recipe-postcard p,
  .scent-landscape p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .section,
  .studio-section {
    padding: 78px 16px;
  }

  .oil-palette {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .scene-grid,
  .history-album,
  .blend-slots,
  .studio-oil-list,
  .dialog-body {
    grid-template-columns: 1fr;
  }

  .history-detail-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .detail-ingredients,
  .detail-ratios,
  .detail-generated,
  .detail-description {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-generated .dialog-image {
    min-height: 260px;
  }

  .detail-description {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ingredient-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .ingredient-card img {
    width: 100%;
    height: 64px;
  }

  .ingredient-card figcaption {
    font-size: 19px;
  }

  .history-print {
    min-height: 0;
    grid-template-columns: 1fr;
    transform: none;
  }

  .history-album.is-carousel {
    min-height: 720px;
  }

  .history-album.is-carousel .history-print {
    width: min(330px, 82vw);
    transform:
      translateX(-50%)
      translateY(calc(var(--slot) * 62px))
      translateZ(calc(var(--abs-slot) * -90px))
      rotateX(calc(var(--slot) * 12deg));
  }

  .history-print:hover {
    transform: translateY(-4px);
  }

  .history-album.is-carousel .history-print:hover {
    transform:
      translateX(-50%)
      translateY(calc((var(--slot) * 62px) - 6px))
      translateZ(calc(var(--abs-slot) * -90px))
      rotateX(calc(var(--slot) * 12deg));
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .history-list-item {
    grid-template-columns: 104px 1fr;
  }

  .history-list-item img {
    width: 104px;
    height: 74px;
  }

  .history-album.is-carousel .history-list {
    bottom: 0;
  }

  .history-print::after {
    display: none;
  }

  .history-photo {
    min-height: 210px;
  }

  .history-note {
    grid-template-columns: 86px 1fr;
    column-gap: 14px;
    padding: 14px;
  }

  .history-thumb {
    grid-row: span 4;
    margin-bottom: 0;
  }

  .history-script {
    font-size: clamp(25px, 9vw, 38px);
  }

  .scene-card {
    min-height: 170px;
  }

  .blend-panel,
  .oil-detail {
    padding: 20px;
  }

  .recipe-line {
    grid-template-columns: 68px 1fr 36px;
  }

  .landscape-image,
  .landscape-image canvas {
    min-height: 210px;
  }

  .generated-space {
    padding: 16px;
  }

  .generated-frame img {
    max-height: 56vh;
  }

  .generated-frame h2 {
    font-size: clamp(22px, 6.4vw, 30px);
  }

  .section-preview {
    display: none;
  }
}
