:root {
  --bg: #f8f7f4;
  --paper: #fbfaf7;
  --ink: #111;
  --muted: #6f6d68;
  --line: #191919;
  --soft-line: #d9d6cf;
  --panel: #f4f2ed;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(24px, 4vw, 72px);
  --max: 1440px;
  --sans: Inter, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; height: auto; }

.site-shell { min-height: 100svh; overflow-x: clip; }
.reference-frame { border: 1px solid var(--line); border-radius: 8px; overflow: clip; background: var(--paper); }
.studio-board { height: 100svh; min-height: 760px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; border-bottom: 1px solid var(--line); }
.primary-stage { position: relative; min-width: 0; }
.studio-header { position: relative; z-index: 30; height: 86px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 36px; padding: 0 var(--pad); }
.brand { width: max-content; font-size: 18px; letter-spacing: -.03em; }
.calm-nav { display: flex; align-items: center; gap: clamp(42px, 6vw, 78px); font-size: 12px; font-weight: 700; }
.calm-nav a, .lang { transition: transform 220ms var(--ease), letter-spacing 220ms var(--ease); }
.calm-nav a:hover, .lang:hover { letter-spacing: .04em; transform: translateY(-1px); }
.header-right { justify-self: end; display: flex; align-items: center; gap: 20px; }
.lang { border: 0; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.gravity-toggle { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px 0 16px; border: 1px solid #b8b6b0; border-radius: 999px; background: #fff; font-size: 10px; font-weight: 800; cursor: pointer; transition: transform 220ms var(--ease), background 220ms var(--ease); }
.gravity-toggle span { width: 18px; height: 18px; border-radius: 50%; background: #111; }
.gravity-toggle:hover { transform: translateY(-1px); }
[data-mode="gravity"] .gravity-toggle, [data-mode="chaos"] .gravity-toggle { background: #111; color: #fff; }
[data-mode="gravity"] .gravity-toggle span, [data-mode="chaos"] .gravity-toggle span { background: #fff; }

.hidden-menu { pointer-events: none; position: fixed; left: 50%; top: 0; z-index: 45; width: min(760px, calc(100vw - 36px)); height: 190px; transform: translateX(-50%); }
.menu-chip { pointer-events: auto; position: absolute; top: -76px; min-width: 86px; height: 38px; padding: 0 20px; border: 1px solid #bcb8ae; border-radius: 6px; background: rgba(255,255,255,.88); box-shadow: 0 7px 14px rgba(20,20,20,.08); font-size: 13px; font-weight: 700; cursor: grab; opacity: 0; transform: translateY(-80px) rotate(var(--r)); transition: transform 900ms var(--ease), opacity 360ms ease; }
.menu-chip:nth-child(1) { left: 4%; --r: -4deg; }
.menu-chip:nth-child(2) { left: 27%; --r: 3deg; }
.menu-chip:nth-child(3) { left: 51%; --r: -2deg; }
.menu-chip:nth-child(4) { left: 73%; --r: 5deg; }
.menu-chip:nth-child(5) { left: 38%; --r: -8deg; top: -88px; }
.menu-chip:nth-child(6) { left: 16%; --r: 7deg; top: -102px; }
[data-menu="visible"] .menu-chip { opacity: 1; transform: translateY(calc(122px + var(--drop, 0px))) rotate(var(--r)); }
[data-menu="visible"] .menu-chip:nth-child(2) { --drop: 20px; transition-delay: 90ms; }
[data-menu="visible"] .menu-chip:nth-child(3) { --drop: 42px; transition-delay: 170ms; }
[data-menu="visible"] .menu-chip:nth-child(4) { --drop: 18px; transition-delay: 250ms; }
[data-menu="visible"] .menu-chip:nth-child(5) { --drop: 62px; transition-delay: 320ms; }
[data-menu="visible"] .menu-chip:nth-child(6) { --drop: 86px; transition-delay: 450ms; }

.hero { position: relative; height: calc(100% - 86px); display: grid; grid-template-columns: .38fr .62fr; gap: clamp(40px, 7vw, 100px); padding: 22px var(--pad) 34px; }
.hero-copy { align-self: center; max-width: 400px; padding-left: clamp(20px, 4vw, 78px); }
.intro { margin: 0 0 72px; font-size: 13px; line-height: 1.55; color: #222; }
.hero-title { margin: 0; font-size: clamp(72px, 6.6vw, 118px); font-weight: 430; letter-spacing: -.07em; line-height: .98; }
.explore { display: inline-flex; align-items: center; gap: 42px; margin-top: 58px; font-size: 11px; font-weight: 800; }
.explore::after { width: 48px; height: 1px; background: #222; content: ""; order: 1; }
.explore span { order: 2; font-size: 18px; }
.hero-visual { align-self: center; justify-self: stretch; margin: 0; max-width: 720px; aspect-ratio: 10 / 7; overflow: hidden; background: #eee; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(.96) brightness(1.04); transition: transform 800ms var(--ease); }
.hero-visual:hover img { transform: scale(1.015); }
.hiding-clue { position: absolute; left: 50%; top: 48%; margin: 0; font-size: 14px; color: #111; opacity: .96; transform: translate(-50%, -50%); }
.copyright { position: absolute; left: var(--pad); bottom: 28px; margin: 0; font-size: 11px; color: #444; }
.social-tiny { position: absolute; right: var(--pad); bottom: 28px; display: flex; gap: 42px; font-size: 11px; }

.creature-panel { position: relative; padding: 96px 46px; border-left: 1px solid var(--line); background: #f8f7f4; }
.creature-panel h2 { margin: 0 0 54px; font-size: 20px; line-height: 1.55; word-break: keep-all; }
.panel-creature, .manual-creature i, .jelly, .mini-shot i { display: block; background: #111; border-radius: 47% 53% 49% 51% / 55% 48% 52% 45%; box-shadow: inset -10px -10px 16px rgba(255,255,255,.05), 0 16px 18px rgba(0,0,0,.18); }
.panel-creature { position: relative; width: 86px; height: 58px; margin-left: 10px; }
.panel-eye, .eye { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.panel-eye.left { left: 32px; top: 27px; }
.panel-eye.right { left: 52px; top: 27px; }
.panel-line { width: 30px; height: 1px; margin: 58px 0 28px; background: #aaa; }
.creature-panel h3 { margin: 0 0 24px; font-size: 15px; }
.creature-panel li { margin: 0 0 17px; font-size: 15px; line-height: 1.4; }

.work-section { position: relative; display: grid; grid-template-columns: 1.1fr .8fr 1fr; grid-template-areas: "head item2 item3" "item1 item2 item4"; gap: 42px; padding: 120px var(--pad); border-top: 1px solid var(--soft-line); }
.work-heading { grid-area: head; display: flex; justify-content: space-between; gap: 24px; font-size: 12px; font-weight: 800; }
.work-item { position: relative; display: grid; align-content: end; min-height: 320px; overflow: hidden; background: #e9e6df; }
.work-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.22) saturate(.55); transition: transform 600ms var(--ease), filter 600ms var(--ease); }
.work-item:hover img { transform: scale(1.018); filter: grayscale(.1) saturate(.65); }
.work-item span, .work-item strong, .work-item em { position: relative; z-index: 2; margin-left: 22px; text-shadow: 0 1px 12px rgba(255,255,255,.5); }
.work-item span { font-size: 11px; font-weight: 800; }
.work-item strong { margin-top: 6px; font-size: 24px; letter-spacing: -.03em; }
.work-item em { margin: 5px 0 22px 22px; font-size: 12px; font-style: normal; color: #333; }
.work-item.tall { grid-area: item1; aspect-ratio: 4 / 5; }
.work-item.square { grid-area: item2; min-height: 560px; }
.work-item.wide { grid-area: item3; aspect-ratio: 10 / 7; }
.work-item.low { grid-area: item4; aspect-ratio: 10 / 7; }

.about-contact { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; padding: 110px var(--pad) 130px; border-top: 1px solid var(--soft-line); }
.about-contact h2 { margin: 0; max-width: 920px; font-size: clamp(42px, 6vw, 96px); line-height: .98; letter-spacing: -.06em; font-weight: 440; }
.about-contact p { align-self: end; margin: 0; font-size: 15px; line-height: 1.7; }
.contact-link { grid-column: 2; font-size: 14px; font-weight: 800; }

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.story-grid article { min-height: 250px; padding: 22px 28px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story-grid article:nth-child(3n) { border-right: 0; }
.story-grid h3 { margin: 0 0 10px; font-size: 16px; }
.story-grid p { margin: 0 0 18px; color: #333; font-size: 13px; }
.mini-shot { position: relative; height: 146px; overflow: hidden; border: 1px solid #b8b6b0; border-radius: 6px; background: #fbfaf7; }
.mini-shot::before { position: absolute; left: 18px; top: 12px; content: "atelier blank"; font-size: 8px; }
.mini-shot strong { position: absolute; left: 28px; top: 42px; font-size: 30px; line-height: .98; letter-spacing: -.06em; font-weight: 430; }
.mini-shot img { position: absolute; right: 18px; bottom: 0; width: 45%; height: 74%; object-fit: cover; filter: grayscale(.2); }
.mini-shot i { position: absolute; right: 24px; bottom: 18px; width: 28px; height: 20px; }
.calm-shot strong { left: 42%; top: 48%; font-size: 13px; letter-spacing: 0; }
.menu-shot b { position: absolute; min-width: 60px; padding: 7px 12px; border: 1px solid #bbb; border-radius: 4px; background: #fff; font-size: 10px; text-align: center; transform: rotate(-7deg); }
.menu-shot b:nth-child(1) { left: 70px; top: 44px; }
.menu-shot b:nth-child(2) { left: 210px; top: 25px; transform: rotate(3deg); }
.menu-shot b:nth-child(3) { left: 340px; top: 48px; transform: rotate(5deg); }
.menu-shot b:nth-child(4) { left: 480px; top: 78px; transform: rotate(10deg); }
.menu-shot b:nth-child(5) { left: 230px; top: 86px; }
.menu-shot i { left: 50%; bottom: 6px; }
.alive-shot span { position: absolute; right: 52px; top: 40px; font-size: 12px; transform: rotate(-10deg); }
.gravity-shot strong { transform: rotate(8deg); border: 1px solid #aaa; padding: 8px; }
.gravity-shot b, .throw-shot b { position: absolute; bottom: 18px; border: 1px solid #aaa; background: #fff; padding: 8px 18px; border-radius: 4px; }
.gravity-shot b:nth-of-type(1) { left: 52px; transform: rotate(-8deg); }
.gravity-shot b:nth-of-type(2) { left: 190px; transform: rotate(6deg); }
.gravity-shot b:nth-of-type(3) { left: 320px; transform: rotate(-4deg); }
.throw-shot b { left: 180px; top: 40px; bottom: auto; font-size: 24px; transform: rotate(-9deg); }
.throw-shot span { position: absolute; left: 300px; top: 20px; font-size: 72px; color: #777; }

.manual-strip { position: sticky; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr) 160px; gap: 0; padding: 10px 28px; border-top: 1px solid var(--line); background: rgba(248,247,244,.94); backdrop-filter: blur(10px); }
.manual-strip div { min-height: 62px; padding: 14px 20px; border-right: 1px dotted #aaa; }
.manual-strip strong { display: block; margin-bottom: 8px; font-size: 13px; }
.manual-strip span { font-size: 12px; color: #333; }
.manual-creature { position: relative; border-right: 0 !important; }
.manual-creature i { position: absolute; right: 18px; bottom: 8px; width: 38px; height: 28px; }

.jelly { position: fixed; z-index: 70; left: 74vw; top: 76vh; width: 46px; height: 34px; cursor: grab; transform-origin: 50% 80%; transition: transform 220ms var(--ease); }
.jelly.hiddenish { opacity: .18; transform: translateY(18px) scale(.82); }
.jelly.running { transform: scaleX(.78) scaleY(1.22) rotate(var(--jelly-rot, 0deg)); }
.jelly.squash { transform: scaleX(1.32) scaleY(.68); }
.jelly .eye-left { left: 16px; top: 16px; }
.jelly .eye-right { left: 29px; top: 16px; }
.jelly.blink .eye { transform: scaleY(.1); }

.reveal-menu-button, .reset-reality { position: fixed; z-index: 80; border: 1px solid #111; background: #fff; border-radius: 999px; cursor: pointer; font-size: 11px; font-weight: 800; }
.reveal-menu-button { left: 20px; bottom: 20px; padding: 12px 16px; display: none; }
.reset-reality { right: 22px; bottom: 92px; padding: 13px 18px; }
.easter-message { position: fixed; left: 50%; top: 16%; z-index: 90; min-height: 24px; transform: translateX(-50%); font-size: 14px; font-weight: 800; }

.physics-item { will-change: transform; touch-action: none; }
.physics-active .physics-item { cursor: grab; }
.physics-active .physics-item.dragging, .jelly.dragging { cursor: grabbing; }
.chaos-lock { overflow: hidden; }

@keyframes loadIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero-copy, .hero-visual, .creature-panel, .story-grid article { animation: loadIn 900ms var(--ease) both; }
.hero-visual { animation-delay: 150ms; }
.creature-panel { animation-delay: 250ms; }

@media (max-width: 1024px) {
  .studio-board { grid-template-columns: 1fr; }
  .creature-panel { border-left: 0; border-top: 1px solid var(--line); padding: 38px var(--pad); }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-left: 0; }
  .intro { margin-bottom: 40px; }
  .hero-visual { width: 100%; max-width: none; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid article:nth-child(3n) { border-right: 1px solid var(--line); }
  .story-grid article:nth-child(2n) { border-right: 0; }
  .work-section { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "item1 item2" "item3 item4"; }
  .about-contact { grid-template-columns: 1fr; }
  .contact-link { grid-column: 1; }
  .manual-strip { grid-template-columns: 1fr 1fr; }
  .manual-creature { display: none; }
}

@media (max-width: 720px) {
  .reference-frame { border-radius: 0; }
  .studio-board { height: auto; min-height: 100svh; }
  .studio-header { height: 72px; grid-template-columns: 1fr auto; }
  .calm-nav { display: none; }
  .reveal-menu-button { display: block; }
  .hero { height: auto; padding-top: 48px; }
  .hero-copy { max-width: none; }
  .hero-title { font-size: clamp(44px, 15vw, 78px); }
  .explore { margin-top: 38px; }
  .hero-visual { margin-top: 44px; }
  .hiding-clue { position: static; transform: none; margin-top: 28px; }
  .story-grid, .work-section, .manual-strip { grid-template-columns: 1fr; }
  .story-grid article, .story-grid article:nth-child(3n) { border-right: 0; }
  .work-section { grid-template-areas: "head" "item1" "item2" "item3" "item4"; padding: 70px var(--pad); }
  .work-heading { display: block; }
  .work-item.square { min-height: 420px; }
  .manual-strip { position: relative; }
  .manual-strip div { border-right: 0; border-bottom: 1px dotted #aaa; }
  .jelly { width: 38px; height: 29px; left: 76vw; top: 68vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal-menu-button { display: block; }
}
