:root {
  --paper: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f5f1f6;
  --ink: #242027;
  --muted: #746e77;
  --line: #ded8e0;
  --accent: #715c82;
  --accent-dark: #564266;
  --accent-light: #eee7f1;
  --max-width: 1180px;
  --shadow: 0 16px 45px rgba(48, 38, 52, 0.08);
  --header-height: 79px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-lightbox-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
section[id] { scroll-margin-top: calc(var(--header-height) + 18px); }
.page-top-anchor { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; pointer-events: none; }

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  color: white;
  background: var(--accent-dark);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.section-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 248, 0.95);
  border-bottom: 1px solid rgba(222, 216, 224, 0.9);
  backdrop-filter: blur(14px);
}
.header-inner {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.15;
}
.brand-mark { width: 32px; height: 32px; display: block; flex: 0 0 32px; object-fit: contain; }
.brand strong {
  display: block;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 24px;
  letter-spacing: 0.16em;
  font-weight: 500;
}
.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.header-controls { display: flex; align-items: center; gap: 22px; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  position: relative;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
  transition: right 180ms ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { right: 0; }
.language-button {
  min-width: 94px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease;
}
.language-button:hover { background: var(--accent-light); border-color: #c9bccf; }
.language-button > span:first-child { font-family: "Yu Mincho", serif; font-size: 14px; }
.menu-button { display: none; }

.hero {
  width: min(calc(100% - 48px), 1320px);
  min-height: 650px;
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(520px, 1.05fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 5vw, 72px);
  background:
    radial-gradient(circle at 12% 14%, rgba(113, 92, 130, 0.11), transparent 27%),
    var(--surface);
}
.hero-copy::after {
  content: "";
  position: absolute;
  right: -90px;
  top: 0;
  bottom: 0;
  width: 150px;
  background: linear-gradient(90deg, var(--surface), rgba(255,255,255,0));
  z-index: -1;
}
.eyebrow {
  margin: 0 0 17px;
  color: var(--accent);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  letter-spacing: 0.12em;
}
.hero h1,
.section-heading h2,
.information h2,
.contact h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 500;
}
.hero h1 {
  margin: 0;
  font-size: clamp(42px, 4.15vw, 55px);
  line-height: 1.38;
  letter-spacing: 0.035em;
}
.hero-title-line { display: block; white-space: nowrap; }
.hero-description {
  max-width: 500px;
  margin: 28px 0 0;
  color: #514b53;
  font-size: 15px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  min-height: 50px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary, .button-copy { color: var(--accent-dark); background: transparent; }
.button-secondary:hover, .button-copy:hover { background: var(--accent-light); }
.hero-art { position: relative; min-height: 650px; margin: 0; background: #eee; }
.hero-art picture { display: block; width: 100%; height: 100%; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent 36%);
  pointer-events: none;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 57% center; }
.hero-art figcaption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 10px;
  color: #fff;
  background: rgba(36, 32, 39, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.section-number {
  margin: 0 0 13px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
}
.skills { padding: 100px 0 104px; }
.compact-heading { text-align: center; }
.section-heading h2,
.information h2,
.contact h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0.055em;
}
.skill-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.skill-card { position: relative; padding: 36px 28px 34px; min-height: 190px; }
.skill-card + .skill-card { border-left: 1px solid var(--line); }
.skill-number { color: #ad9fb3; font-family: Georgia, serif; font-size: 12px; letter-spacing: .12em; }
.skill-card h3 { margin: 24px 0 6px; font-size: 18px; }
.skill-card p { margin: 0; color: var(--muted); font-size: 13px; }

.works { padding: 26px 0 120px; }
.section-heading {
  margin-bottom: 44px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}
.section-intro { max-width: 460px; margin: 0; color: var(--muted); font-size: 14px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}
.work-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(48, 38, 52, 0.045);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.work-card:hover { border-color: #c8bccd; box-shadow: 0 12px 34px rgba(48, 38, 52, 0.075); }
.work-link { display: block; text-decoration: none; cursor: zoom-in; }
.work-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f4f1f3;
  border-bottom: 1px solid var(--line);
}
.work-image picture { display: block; width: 100%; }
.work-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  image-rendering: auto;
}
.work-meta { padding: 20px 22px 23px; }
.work-meta span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.work-meta h3 { margin: 5px 0 3px; font-size: 18px; }
.work-meta p { margin: 0; color: var(--muted); font-size: 13px; }

.information { padding: 110px 0; background: var(--surface-soft); border-block: 1px solid var(--line); }
.information-inner { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 0; }
.profile-panel { padding-right: clamp(40px, 8vw, 110px); }
.environment-panel { padding-left: clamp(40px, 7vw, 90px); border-left: 1px solid var(--line); }
.lead { margin: 28px 0 15px; font-size: 18px; line-height: 1.9; }
.profile-panel > p:not(.section-number):not(.lead) { color: var(--muted); }
.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.detail-list { margin: 32px 0 0; }
.detail-list div { padding: 15px 0; display: grid; grid-template-columns: 112px 1fr; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-list dd { margin: 0; font-size: 14px; }

.conditions { padding: 115px 0 125px; }
.condition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.condition-grid article { padding: 34px 30px; background: var(--surface); border: 1px solid var(--line); }
.condition-label { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.condition-grid h3 { margin: 14px 0 20px; font-size: 20px; }
.condition-grid ul { margin: 0; padding: 0; list-style: none; }
.condition-grid li { position: relative; padding: 9px 0 9px 19px; color: var(--muted); font-size: 13px; border-top: 1px solid #eee9ef; }
.condition-grid li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 900; }

.contact { padding: 88px 0; color: #fff; background: #302a33; }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 80px; }
.contact .section-number { color: #d7c9de; }
.contact h2 { color: #fff; }
.contact-inner > div:first-child p:last-child { max-width: 520px; color: #d6d0d8; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.contact .button-primary { background: #fff; border-color: #fff; color: var(--accent-dark); }
.contact .button-copy { border-color: #8f8294; color: #fff; background: transparent; }
.contact .button-copy:hover { background: rgba(255,255,255,.08); }
.email-display { width: 100%; margin: 8px 0 0; color: #d6d0d8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.copy-status { width: 100%; min-height: 1.8em; margin: 0; color: #d7c9de; font-size: 12px; opacity: 0; transform: translateY(-2px); transition: opacity 220ms ease, transform 220ms ease; }
.copy-status.is-visible { opacity: 1; transform: translateY(0); }

.site-footer { padding: 24px 0; background: #211d23; color: #aaa3ad; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: #fff; }

/* Lightbox */
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(20, 17, 22, 0.88);
  border: 0;
  cursor: zoom-out;
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1420px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: var(--ink);
  background: #f7f5f6;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}
.lightbox-toolbar {
  min-height: 48px;
  padding: 0 12px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.lightbox-count { margin: 0; color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; }
.lightbox-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.lightbox-tool,
.lightbox-close,
.lightbox-nav {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.lightbox-tool { min-height: 34px; padding: 5px 12px; font-size: 12px; }
.lightbox-close { width: 36px; height: 36px; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.lightbox-tool:hover,
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--accent-light); border-color: #c9bccf; }
.lightbox-stage {
  min-height: 260px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(45deg, #ece9ec 25%, transparent 25%),
    linear-gradient(-45deg, #ece9ec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ece9ec 75%),
    linear-gradient(-45deg, transparent 75%, #ece9ec 75%),
    #f4f2f4;
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.lightbox-stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 240px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0,0,0,.16);
  cursor: zoom-in;
}
.lightbox-stage.is-zoomed { display: block; }
.lightbox-stage.is-zoomed img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}
.lightbox-footer {
  min-height: 104px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.lightbox-nav { width: 46px; height: 46px; font-size: 20px; }
.lightbox-caption { min-width: 0; text-align: center; }
.lightbox-caption > span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.lightbox-caption h2 { margin: 1px 0 0; font-size: 18px; }
.lightbox-caption p { margin: 1px 0 4px; color: var(--muted); font-size: 12px; }
.lightbox-caption a { color: var(--accent-dark); font-size: 12px; font-weight: 700; text-underline-offset: 4px; }

:focus-visible { outline: 3px solid rgba(113, 92, 130, 0.42); outline-offset: 4px; }

@media (max-width: 1120px) {
  :root { --header-height: 73px; }
  .brand { min-width: auto; }
  .brand small { display: none; }
  .site-nav { gap: 22px; }
  .header-controls { gap: 14px; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 66px clamp(38px, 8vw, 92px); }
  .hero-copy::after { display: none; }
  .hero h1 { font-size: clamp(43px, 5.5vw, 60px); }
  .hero-art { min-height: 520px; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .skill-card:nth-child(4) { border-top: 1px solid var(--line); }
  .information-inner { grid-template-columns: 1fr; gap: 60px; }
  .profile-panel { padding-right: 0; }
  .environment-panel { padding: 55px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .condition-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 38px; }
}

@media (max-width: 820px) {
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 13px; }
  .language-button { min-width: 82px; padding-inline: 9px; }
}

@media (max-width: 760px) {
  :root { --header-height: 69px; }
  .section-shell, .header-inner, .hero { width: min(calc(100% - 28px), var(--max-width)); }
  .header-inner { min-height: var(--header-height); gap: 12px; }
  .brand strong { font-size: 20px; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .header-controls { gap: 8px; }
  .language-button { min-width: 74px; height: 40px; padding: 0 9px; }
  .language-button > span:first-child { display: none; }
  .menu-button {
    width: 46px;
    height: 42px;
    padding: 10px;
    display: grid;
    place-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
  }
  .menu-button span { width: 22px; height: 1px; display: block; background: var(--ink); }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 14px;
    right: 14px;
    padding: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 10px; font-size: 14px; }
  .site-nav a + a { border-top: 1px solid #eee9ef; }
  .site-nav a::after { display: none; }

  .hero { margin-top: 14px; }
  .hero-copy { padding: 50px 25px 52px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 43px); line-height: 1.42; letter-spacing: .025em; }
  .hero-description { margin-top: 24px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-art { min-height: 330px; }

  .skills { padding: 78px 0; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card + .skill-card { border-left: 0; border-top: 1px solid var(--line); }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; }
  .works { padding-bottom: 90px; }
  .gallery { grid-template-columns: 1fr; gap: 20px; }
  .work-meta { padding: 18px 18px 21px; }
  .information { padding: 82px 0; }
  .conditions { padding: 85px 0 92px; }
  .contact { padding: 72px 0; }
  .contact-actions { display: block; }
  .contact-actions .button + .button { margin-top: 11px; }
  .email-display { overflow-wrap: anywhere; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }

  .lightbox { padding: 0; }
  .lightbox-dialog { width: 100%; max-height: 100vh; min-height: 100vh; border: 0; }
  .lightbox-stage { padding: 10px; }
  .lightbox-stage img { max-height: calc(100vh - 238px); }
  .lightbox-footer { min-height: 118px; padding: 12px 10px; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 8px; }
  .lightbox-nav { width: 40px; height: 48px; }
  .lightbox-caption h2 { font-size: 16px; }
  .lightbox-caption p { display: none; }
}

@media (max-width: 390px) {
  .brand { gap: 8px; }
  .brand strong { font-size: 18px; }
  .language-button { min-width: 64px; font-size: 11px; }
  .hero h1 { font-size: clamp(27px, 8vw, 32px); }
  .hero-copy { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* English headings require slightly less display size because Latin words are wider. */
html[data-language="en"] .hero h1 {
  font-size: clamp(38px, 3.5vw, 48px);
  letter-spacing: 0;
}

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  html[data-language="en"] .hero h1 {
    font-size: clamp(25px, 6.9vw, 36px);
  }
}

/* =========================================================
   Version 0.3 refinements
   ========================================================= */

/* Cleaner Japanese line breaking and slightly more room for short intros. */
.section-intro {
  max-width: 520px;
  line-break: strict;
  text-wrap: pretty;
}
html[data-language="ja"] .section-intro {
  font-size: 13.5px;
}

/* Dense masonry-like gallery. JavaScript adds .masonry-active and row spans. */
@media (min-width: 761px) {
  .gallery.masonry-active {
    grid-auto-rows: 8px;
    row-gap: 16px;
    align-items: start;
  }
  .gallery.masonry-active .work-card {
    grid-row-end: span var(--masonry-span, 1);
  }
}
.work-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  background: var(--accent-light);
  border: 1px solid #ded2e3;
  border-radius: 999px;
  line-height: 1.2;
}
.work-link:focus-visible {
  outline-offset: -4px;
}

/* Profile portrait and a more balanced profile/environment split. */
.information-inner {
  grid-template-columns: minmax(0, 1.14fr) minmax(390px, 1fr);
}
.profile-panel {
  padding-right: clamp(34px, 5vw, 72px);
}
.environment-panel {
  padding-left: clamp(34px, 5vw, 68px);
}
.profile-layout {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(26px, 4vw, 48px);
}
.profile-portrait {
  align-self: start;
  width: min(100%, 210px);
  min-height: 0;
  margin: 0;
  display: grid;
  place-items: start center;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.profile-portrait::after {
  display: none;
}
.profile-portrait img {
  display: block;
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: auto;
  opacity: .96;
  filter: contrast(1.18);
}
html[data-language="ja"] .profile-portrait img {
  max-height: 334px;
}
html[data-language="en"] .profile-portrait img {
  max-height: 286px;
}
.profile-copy .lead {
  margin-top: 0;
}
.profile-copy > p:not(.lead) {
  color: var(--muted);
}
.profile-manga-button {
  width: fit-content;
  min-height: 44px;
  margin-top: 18px;
  padding: 9px 16px;
  background: rgba(255,255,255,.45);
}
.detail-list div {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
}
.detail-list dd {
  font-size: 13.5px;
  line-break: strict;
}
html[data-language="ja"] .detail-list dd {
  letter-spacing: -.01em;
}

/* Copyright notice. */
.copyright-block {
  display: grid;
  gap: 3px;
}
.copyright-block small {
  color: #837b86;
  font-size: 10px;
  line-height: 1.5;
}

/* Rebuilt artwork viewer. */
.lightbox {
  padding: 18px;
}
.lightbox-backdrop {
  background: rgba(23, 20, 25, .86);
  backdrop-filter: blur(4px);
}
.lightbox-dialog {
  width: min(96vw, 1500px);
  height: min(94vh, 980px);
  max-height: none;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #f7f5f6;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 4px;
}
.lightbox-stage {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: block;
  touch-action: none;
  user-select: none;
  overscroll-behavior: contain;
  background:
    linear-gradient(45deg, rgba(236,233,236,.78) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(236,233,236,.78) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(236,233,236,.78) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(236,233,236,.78) 75%),
    #f4f2f4;
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.lightbox-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: default;
}
.lightbox-stage.is-pannable .lightbox-canvas { cursor: grab; }
.lightbox-stage.is-dragging .lightbox-canvas { cursor: grabbing; }
.lightbox-stage.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 30px;
  height: 30px;
  margin: -15px;
  border: 2px solid rgba(113,92,130,.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lightbox-spin .72s linear infinite;
}
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
.lightbox-stage img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  object-fit: initial;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  cursor: inherit;
  opacity: 1;
  transform-origin: center center;
  will-change: transform;
  transition: opacity 150ms ease;
  -webkit-user-drag: none;
}
.lightbox-stage img.is-changing { opacity: 0; }
.lightbox-count,
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 5;
}
.lightbox-count {
  top: 16px;
  left: 17px;
  margin: 0;
  min-width: 58px;
  padding: 7px 11px;
  color: #403843;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(113,92,130,.2);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(35,29,38,.13);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}
.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255,255,255,.93);
  border: 1px solid rgba(113,92,130,.24);
  border-radius: 50%;
  box-shadow: 0 7px 22px rgba(35,29,38,.16);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: #fff;
  border-color: #b9a7c3;
  transform: scale(1.06);
}
.lightbox-close {
  top: 14px;
  right: 15px;
  width: 44px;
  height: 44px;
  font-size: 25px;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  width: 58px;
  height: 58px;
  margin-top: -29px;
  font-size: 25px;
}
.lightbox-prev { left: 17px; }
.lightbox-next { right: 17px; }
.lightbox-footer {
  min-height: 96px;
  padding: 13px 78px 14px;
  display: block;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line);
}
.lightbox-caption {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}
.lightbox-caption > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
}
.lightbox-caption h2 {
  margin: 0;
  font-size: 17px;
}
.lightbox-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}
.lightbox-caption .lightbox-help {
  margin-top: 2px;
  color: #918994;
  font-size: 10.5px;
}
.lightbox-caption a {
  display: inline-block;
  margin-top: 3px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (max-width: 1120px) {
  .information-inner { grid-template-columns: 1fr; }
  .profile-panel { padding-right: 0; }
  .profile-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .environment-panel { padding: 55px 0 0; }
}

@media (max-width: 760px) {
  .gallery,
  .gallery.masonry-active {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 20px;
  }
  .gallery .work-card,
  .gallery.masonry-active .work-card {
    grid-row-end: auto !important;
  }
  .work-meta > span { min-height: 22px; }
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .profile-portrait {
    width: min(58vw, 190px);
    min-height: 0;
    margin-inline: auto;
  }
  .profile-copy { text-align: left; }
  .profile-manga-button {
    width: 100%;
  }
  .detail-list div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
  }
  .detail-list dd { font-size: 13px; }
  .copyright-block { text-align: center; }

  .lightbox { padding: 0; }
  .lightbox-dialog {
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .lightbox-count { top: 12px; left: 12px; }
  .lightbox-close { top: 10px; right: 11px; width: 43px; height: 43px; }
  .lightbox-nav {
    width: 46px;
    height: 46px;
    margin-top: -23px;
    font-size: 21px;
  }
  .lightbox-prev { left: 9px; }
  .lightbox-next { right: 9px; }
  .lightbox-footer {
    min-height: 112px;
    padding: 11px 54px 13px;
  }
  .lightbox-caption h2 { font-size: 15px; }
  .lightbox-caption > p:not(.lightbox-help) { display: none; }
  .lightbox-caption .lightbox-help { font-size: 9.5px; line-height: 1.45; }
}

@media (max-width: 390px) {
  .profile-portrait { width: min(64vw, 178px); min-height: 238px; }
  .lightbox-footer { padding-inline: 49px; }
  .lightbox-caption h2 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-stage img { transition: none; }
  .lightbox-stage.is-loading::after { animation: none; }
}


/* =========================================================
   Version 0.4 refinements
   ========================================================= */

/* The transparent character is presented as artwork rather than a framed card. */
@media (min-width: 761px) {
  .profile-layout {
    grid-template-columns: clamp(210px, 18vw, 232px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(30px, 4vw, 50px);
  }
  .profile-portrait {
    width: clamp(188px, 17vw, 220px);
    min-height: 0;
    align-self: start;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .profile-portrait::after { display: none; }
  .profile-portrait img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
  html[data-language="ja"] .profile-portrait img {
    max-height: 334px;
  }
  html[data-language="en"] .profile-portrait img {
    width: min(100%, 220px);
    max-height: none;
  }
}

/* Keep environment labels and values clearly separated at intermediate widths. */
.detail-list div {
  grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
  column-gap: 18px;
}
html[data-language="en"] .detail-list div {
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: clamp(20px, 2.4vw, 30px);
}

/* The address remains selectable; decorative artwork itself cannot be dragged. */
img {
  -webkit-user-drag: none;
  user-select: none;
}
.email-display { user-select: text; }

/* Floating return-to-top button. */
.floating-top-button {
  position: fixed;
  right: clamp(18px, 2.5vw, 34px);
  bottom: clamp(18px, 2.5vw, 34px);
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(113, 92, 130, .28);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(48, 38, 52, .16);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(.94);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease,
              background 180ms ease, border-color 180ms ease;
}
.floating-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.floating-top-button:hover {
  background: #fff;
  border-color: #b9a7c3;
  transform: translateY(-2px) scale(1.03);
}
.floating-top-button span {
  transform: translateY(-1px);
  font-size: 20px;
  line-height: 1;
}


@media (min-width: 761px) {
  html[data-language="ja"] .profile-manga-button {
    padding-inline: 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .profile-portrait {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .profile-portrait::after { display: none; }
  .profile-portrait img {
    width: min(92%, 164px);
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }

  .detail-list div {
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
    column-gap: clamp(14px, 3.8vw, 24px);
  }
  html[data-language="en"] .detail-list div {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: clamp(18px, 4.5vw, 28px);
  }
  html[data-language="en"] .detail-list dt {
    font-size: clamp(10.5px, 2.6vw, 12px);
  }
  html[data-language="en"] .detail-list dd {
    font-size: clamp(10.8px, 2.7vw, 13px);
  }

  .floating-top-button {
    right: 15px;
    bottom: 15px;
    width: 44px;
    height: 44px;
  }
}

/* At common phone widths, keep the two long English environment values on one line. */
@media (min-width: 390px) and (max-width: 760px) {
  html[data-language="en"] .detail-list dd {
    white-space: nowrap;
  }
}

@media (max-width: 389px) {
  html[data-language="en"] .detail-list div {
    column-gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-top-button { transition: none; }
}
