:root {
  color: #555555;
  background: #fff;
  font-family: "unibody-8-new", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
}

.view-inspector {
  position: fixed;
  z-index: 5;
  bottom: 24px;
  left: 24px;
  width: min(320px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid #080808;
  background: #fff;
  font: 12px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  text-transform: none;
}
.view-inspector summary { cursor: pointer; }
.view-inspector pre { font: 12px/1.7 monospace; margin: 8px 0; }
.view-inspector p { margin: 8px 0 0; }
.view-inspector button {
  padding: 5px 10px;
  border: 1px solid #080808;
  background: #fff;
  color: #555555;
  font: inherit;
  cursor: pointer;
}
.view-inspector button:hover { background: #080808; color: #fff; }

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

body {
  overscroll-behavior: none;
  text-transform: uppercase;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 32rem;
  isolation: isolate;
}

.brand {
  position: fixed;
  z-index: 2;
  top: max(24px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
}

.brand h1 {
  margin: 0;
  font-family: "unibody-8-new", sans-serif;
  font-size: clamp(1.05rem, 1.25vw, 1.3rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-link {
  color: inherit;
  text-decoration: none;
}

.home-link:focus-visible {
  outline: 1px solid #080808;
  outline-offset: 4px;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.78rem;
  margin-top: 2.55rem;
}

.site-nav a {
  position: relative;
  margin-left: -0.32em;
  padding: 0.12em 0.32em 0.14em;
  background: transparent;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: #080808;
  color: #fff;
}

.site-nav a:focus-visible {
  outline: 1px solid #080808;
  outline-offset: 3px;
}

.site-nav a[data-section="privacy-policy"] {
  position: fixed;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  font-family: "unibody-8-small-caps-new", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.type-title::after,
.type-text.is-typing::after {
  display: inline-block;
  margin-left: 0.08em;
  content: "_";
  animation: cursor-blink 700ms steps(1, end) infinite;
}

.type-text[data-lang="ja"] {
  font-family: "DotGothic16", sans-serif;
  font-size: 1.04em;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.08em;
}

@keyframes cursor-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

.canvas-wrap {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: none;
}

.canvas-wrap:active { cursor: grabbing; }

.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.content-layer {
  position: fixed;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.content-panel {
  position: absolute;
  top: 50%;
  left: 51.5%;
  width: min(34rem, 38vw);
  opacity: 0;
  transform: translateY(calc(-50% + 10px));
  color: #555555;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: clamp(0.72rem, 0.86vw, 0.92rem);
  font-weight: 400;
  line-height: 1.85;
  text-transform: none;
  visibility: hidden;
  transition: opacity 220ms linear, transform 220ms linear, visibility 0s linear 220ms;
}

.content-panel.is-visible {
  opacity: 1;
  transform: translateY(-50%);
  visibility: visible;
  transition-delay: 0s;
}

.content-panel h2 {
  margin: 0 0 1.2rem;
  font-family: "unibody-8-new", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1;
}

/* The model keeps one shared X/Y pivot. Place copy independently so the
   front-facing EXPERIENCE view never sits underneath the frames. */
.content-panel--experience {
  top: 38%;
}

@media (min-width: 641px) {
  .content-panel--experience {
    top: calc(38% + 100px);
    left: calc(51.5% - 230px);
  }
}

.content-panel p { margin: 0; }
.mobile-break, .mobile-punctuation { display: none; }
.content-panel small { font-size: 0.72em; }

.content-panel dl,
.content-panel dd { margin: 0; }

.content-panel dl div {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.5rem;
}

.content-panel dt { letter-spacing: 0.24em; }
.content-panel dd { font-weight: 400; }

@media (min-width: 641px) {
  .content-panel--about {
    top: calc(50% + 3.7em);
    left: calc(51.5% - 4.7em);
  }
}

.content-panel--contact {
  left: 43.5%;
  width: min(17rem, 25vw);
  pointer-events: none;
}

.content-panel--contact.is-visible { pointer-events: auto; }

@media (min-width: 641px) {
  .content-panel--privacy {
    top: 50%;
    left: calc(51.5% - 330px);
  }
}

@media (min-width: 641px) {
  .content-panel--contact {
    top: calc(50% + 35px);
    left: 50%;
    transform: translate(-50%, calc(-50% + 10px));
  }
  .content-panel--contact.is-visible {
    transform: translate(-50%, -50%);
  }
}

.content-panel form {
  display: grid;
  gap: 0.55rem;
}

.content-panel label {
  display: grid;
  gap: 0.15rem;
}

.content-panel input,
.content-panel textarea,
.content-panel button {
  width: 100%;
  border: 1px solid #777;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.86);
  color: #555555;
  font: inherit;
}

.content-panel input { height: 1.8rem; }
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form button:focus-visible {
  border-color: #000000;
  outline: 1px solid #000000;
  outline-offset: 0;
  box-shadow: none;
}
#contact-status:empty { display: none; }
.grecaptcha-badge { visibility: hidden; }
#contact-form .recaptcha-notice {
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0;
}
#contact-status { font-size: 0.9em; line-height: 1.5; }
#contact-form button:disabled { cursor: wait; opacity: 0.6; }
.content-panel textarea { resize: none; }
.content-panel button {
  justify-self: end;
  width: 7rem;
  padding: 0.25rem;
  cursor: pointer;
}

.loading {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  transition: opacity 400ms ease;
}

.loading.is-hidden { opacity: 0; }

.guide {
  position: fixed;
  z-index: 2;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  gap: 1rem;
  margin: 0;
  font-family: "unibody-8-small-caps-new", sans-serif;
  font-size: 0.58rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.error {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  width: min(80vw, 30rem);
  margin: 0;
  transform: translateX(-50%);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 640px) {
  .brand { top: max(20px, env(safe-area-inset-top)); left: 20px; }
  .site-nav {
    gap: 1rem;
    margin-top: 1.7rem;
  }
  .guide {
    right: 20px;
    left: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 0.49rem;
    text-align: right;
  }
  .guide span:last-child { display: none; }
  .content-panel,
  .content-panel--contact {
    top: 42%;
    right: 4.8%;
    bottom: auto;
    left: 12%;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    font-size: 0.72rem;
    line-height: 1.85;
    transform: translateY(8px);
  }
  .content-panel.is-visible { transform: translateY(0); }
  .content-panel h2 { margin-bottom: 0.8rem; font-size: 0.85rem; }
  .view-inspector, .view-inspector pre { font-size: 11px; }
  .loading, .error { font-size: 0.65rem; }
  .content-panel dl div { grid-template-columns: 4.7rem 1fr; }
  .content-panel[data-panel="services"] {
    top: 50%;
    right: 3%;
    left: calc(44% - 5px);
    transform: translateY(calc(-50% + 8px));
  }
  .content-panel[data-panel="services"].is-visible { transform: translateY(-50%); }
  .content-panel--about {
    top: 45%;
    right: calc(2% - 35px);
    left: calc(13% + 35px);
  }
  .content-panel--experience {
    top: 50%;
    right: calc(4% - 15px);
    left: calc(5% + 15px);
    transform: translateY(calc(-50% + 8px));
  }
  .content-panel--experience.is-visible { transform: translateY(-50%); }
  .content-panel--experience br { display: none; }
  .mobile-break, .content-panel--experience br.experience-break { display: initial; }
  .mobile-punctuation { display: inline; }
  .desktop-punctuation { display: none; }
  .content-panel--privacy {
    top: 50%;
    right: calc(15% + 10px);
    left: calc(12% - 10px);
    transform: translateY(calc(-50% + 8px));
  }
  .content-panel--privacy.is-visible { transform: translateY(-50%); }
  .content-panel--contact {
    top: calc(40% - 35px);
    right: calc(18% - 10px);
    left: calc(17% - 10px);
  }
  .content-panel input { height: 2rem; }
  .content-panel--contact input,
  .content-panel--contact textarea { font-size: 16px; }
  .content-panel textarea {
    height: 5.25rem;
    min-height: 5.25rem;
  }
  .content-panel button { width: 100%; }
  .site-nav a[data-section="privacy-policy"] {
    left: 20px;
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 0.49rem;
  }
}

@media (prefers-color-scheme: dark) {
  html { background: #000; }
  body { filter: invert(1); }
}

@media (prefers-reduced-motion: reduce) {
  .loading { transition: none; }
  .type-title::after,
  .type-text.is-typing::after { animation: none; }
  .content-panel { transition: none; }
}
