:root {
  --bg: #faf7f2;
  --paper: #ffffff;
  --ink: #2f2a26;
  --muted: #5c534b;
  --accent: #7d5c4e;
  --line: #e4dbd1;
  --focus: #7d5c4e;
  --error: #9c3b32;
  --header-h: 4.75rem;
  --max: 68rem;
  --body-copy-size: clamp(1.1rem, 0.85rem + 0.6vw, 1.28125rem);
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: var(--body-copy-size);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
.lead,
.footer-name,
.brand-kicker {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  text-align: center;
}

h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 2.2vw, 1.4rem);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 200;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.multi-image-badge {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  padding: 0.35rem 0.65rem;
  background: rgba(47, 42, 38, 0.82);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 999px;
  pointer-events: none;
}

.gallery-guide {
  margin: 1.5rem auto 1.4rem;
  max-width: 40rem;
  text-align: left;
  color: var(--muted);
  font-size: var(--body-copy-size);
  margin-top: 1.8rem;
  margin-bottom: 2rem;
  line-height: 2;
}

.gallery-guide p {
  margin-bottom: 1.4rem;
}

.gallery-guide-note {
  margin-top: 2rem;
  margin-bottom: 0;
  text-align: center;
  font-size: 1.05rem;
}

.copyright-notice {
  margin-top: 2rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 1.5rem, 80rem);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  width: auto;
  height: 4rem;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border-radius: 50%;
}

.brand-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-kicker {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 1.05rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  inset: var(--header-h) 0.75rem auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.6rem;
  box-shadow: 0 16px 40px rgba(47, 42, 38, 0.08);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0.6rem;
}

.site-nav a:hover {
  background: var(--bg);
}

.main-visual {
  width: min(100%, 80rem);
  margin: 0.75rem auto 0;
  padding-inline: 0.75rem;
}

.main-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: transparent;
  border-radius: 0.4rem;
}

.section {
  padding: clamp(3.2rem, 8vw, 5.5rem) 0;
}

.section-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.prose {
  max-width: 40rem;
  margin-inline: auto;
}

.prose p {
  text-align: left;
  margin-bottom: 1.4em;
}

.lead {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  text-align: center;
  color: var(--ink);
  margin-bottom: 1.6rem;
}

.gallery-block {
  margin-top: 5rem;
}

.gallery-block h3 {
  text-align: center;
}

#original-title {
  font-size: clamp(1.5625rem, 2.75vw, 1.75rem);
}

.gallery-note {
  text-align: center;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 1.4rem;
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  gap: 1rem;
}

.gallery-featured {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.gallery-featured .work-btn {
  width: 100%;
  margin-inline: auto;
}

.work-static {
  cursor: default;
}

.gallery-featured:has(.work-btn:only-child) {
  grid-template-columns: minmax(0, 36rem);
  justify-content: center;
}

.gallery-thumbs {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.work-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: #f3eee7;
  cursor: pointer;
  border-radius: 0.35rem;
  overflow: hidden;
}

.work-frame {
  display: grid;
  place-items: center;
  background: #f3eee7;
  aspect-ratio: 4 / 3;
  padding: 0.6rem;
  position: relative;
}

.work-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbs .work-frame {
  aspect-ratio: 1 / 1;
  padding: 0.35rem;
}

.copyright-note {
  max-width: 48rem;
  margin: 4rem auto 0;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.profile-history {
  margin: 0;
}

.profile-history > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.profile-history dt {
  font-weight: 600;
}

.profile-history dd {
  margin: 0;
}

.profile-note,
.contact-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li + li {
  margin-top: 1.4rem;
}

.news-list article {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.news-list time {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.news-list h3 {
  font-size: 1.05rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 1.05rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}

.field-error {
  min-height: 1.15em;
  margin: 0;
  color: var(--error);
  font-size: 0.82rem;
}

.btn {
  justify-self: start;
  min-height: 2.85rem;
  padding: 0.55rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.btn:hover {
  background: #694b3f;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-status.is-success {
  color: #3f6b4e;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.8rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.footer-name {
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: var(--body-copy-size);
}

.to-top {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 30, 26, 0.62);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 72rem);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  background: #f3eee7;
  border-radius: 0.8rem;
  padding: 2.6rem 1rem 1.2rem;
}

.lightbox-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.lightbox-layout {
  display: grid;
  gap: 1rem;
}

.lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
}

.lightbox-figure {
  margin: 0;
  min-height: 12rem;
  display: grid;
  place-items: center;
  background: #f3eee7;
  padding: 0.6rem;
}

.lightbox-figure img {
  max-height: min(58svh, 32rem);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.12s ease;
}

.lightbox-nav {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--ink);
}

.lightbox-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.5rem;
}

.lightbox-thumb {
  padding: 0.2rem;
  border: 1px solid var(--line);
  background: #f3eee7;
  cursor: pointer;
  border-radius: 0.3rem;
}

.lightbox-thumb.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.lightbox-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

@media (max-width: 639px) {
  .profile-history > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (min-width: 640px) {
  .main-visual img {
    aspect-ratio: 16 / 9;
  }

  .gallery-featured {
    grid-template-columns: 1fr;
  }

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

@media (min-width: 768px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand {
    justify-self: auto;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    inset: auto;
  }

  .site-nav ul {
    display: flex;
    gap: 0.15rem;
  }

  .site-nav a {
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 1024px) {
  .lightbox-layout {
    grid-template-columns: minmax(0, 1.7fr) 14rem;
    align-items: start;
  }

  .lightbox-layout.is-single {
    display: flex;
    justify-content: center;
  }

  .lightbox-layout.is-single .lightbox-stage {
    width: fit-content;
    max-width: 100%;
  }

  .lightbox-layout.is-single .lightbox-figure {
    width: fit-content;
    max-width: 100%;
    margin: 0;
  }

  .lightbox-thumbs {
    grid-template-columns: 1fr 1fr;
    max-height: min(70svh, 36rem);
    overflow: auto;
  }

  .lightbox-figure img {
    max-height: min(72svh, 40rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nav-toggle span {
    transition: none;
  }
}
