
:root {
  --bg: #f6f2ee;
  --bg-deep: #efe8e2;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: #d4cac1;
  --ink: #201b18;
  --sub: #504740;
  --accent: #6f4450;
  --accent-soft: #e9dce0;
  --focus: #1d5ea8;
  --shadow: 0 16px 40px rgba(58, 43, 34, 0.08);
  --shadow-soft: 0 10px 26px rgba(58, 43, 34, 0.055);
  --header-height: 78px;
  --featured-controls-height: 82px;
  --header-offset: 18px;
  --tanka-gap: 24px;
  --tanka-layout-width: min(86vw, 720px);
  --site-width: min(1120px, calc(100vw - 32px));
  --content-rail: min(980px, calc(100vw - 32px));
  --body-font: "BIZ UDPGothic", "BIZ UDGothic", "Yu Gothic UI", "YuGothic", "Hiragino Sans", "Meiryo", "Noto Sans JP", sans-serif;
  --tanka-font: "BIZ UDPMincho", "BIZ UDMincho Medium", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at left top, rgba(130, 102, 114, 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #f8f5f2 100%);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.85;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a[href] { text-underline-offset: 0.18em; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  transform: translateY(-160%);
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.skip-link:focus { transform: translateY(0); }

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

a:hover,
a:focus-visible { color: var(--accent); }

.site-header {
  position: absolute;
  inset: 16px 0 auto;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.site-header.is-hidden {
  transform: none;
  opacity: 1;
}
.header-inner {
  width: var(--content-rail);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: calc(100vw - 92px);
}
.brand-ja {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0;
}
.brand-en {
  font-size: 0.72rem;
  color: var(--sub);
  letter-spacing: 0;
}

.global-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.global-nav a {
  font-size: 0.82rem;
  color: var(--sub);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: center;
  transition: transform 180ms ease, opacity 160ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

main {
  display: block;
}

.section {
  width: var(--content-rail);
  margin: 0 auto;
  padding: 64px 0;
}
.section + .section {
  border-top: 1px solid rgba(212, 202, 193, 0.55);
}
.section-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 20px;
  text-align: left;
}
.section-heading.center { text-align: left; }
.section-heading.narrow { max-width: none; margin-inline: 0 auto; margin-bottom: 20px; }
.eyebrow {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(80, 71, 64, 0.6);
  font-weight: 600;
}
.section-heading h2,
.profile-copy h3,
.plain-card h3,
.news-item h3,
.contact-grid h3 {
  margin: 0;
  line-height: 1.45;
}
.section-heading h2 {
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0;
}
.section-heading p,
.profile-copy p,
.plain-card p,
.news-item p,
.contact-grid p,
.featured-counter { margin: 0; }

.featured-hero {
  min-height: 100svh;
  padding: 30px 0 18px;
}
.featured-shell {
  width: var(--site-width);
  min-height: calc(100svh - 48px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: 1fr;
  align-items: stretch;
}
.featured-stage {
  min-height: calc(100svh - 48px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}
.featured-center {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: visible;
}
.featured-tanka {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.featured-loading,
.loading-inline {
  color: var(--sub);
}
.tanka-layout {
  width: var(--tanka-layout-width);
  max-height: calc(100svh - var(--featured-controls-height) - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  grid-template-areas: "source body spacer";
  align-items: flex-end;
  justify-content: center;
  column-gap: clamp(18px, 3vw, 34px);
  margin-inline: auto;
  overflow: visible;
}
.tanka-body-wrap {
  grid-area: body;
  display: grid;
  justify-items: center;
  justify-self: center;
  min-width: 0;
  max-width: none;
  z-index: 1;
}
.tanka-body {
  margin: 0;
  font-family: var(--tanka-font);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: normal;
  line-height: 1.85;
  letter-spacing: 0.08em;
  font-size: clamp(1.5rem, 3.2svh, 2.3rem);
  max-height: min(66svh, 680px);
  width: max-content;
  max-width: calc(var(--tanka-layout-width) - 7rem);
  overflow-wrap: normal;
}
.tanka-body ruby {
  ruby-align: center;
  ruby-position: inter-character;
}
.tanka-body rt {
  font-family: var(--tanka-font);
  font-size: 0.28em;
  line-height: 1;
  letter-spacing: 0;
}
.tanka-source {
  grid-area: source;
  align-self: end;
  justify-self: end;
  margin: 0;
  font-family: var(--body-font);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  color: var(--sub);
  font-size: clamp(0.78rem, 1.55svh, 0.94rem);
  line-height: 1.7;
  opacity: 0.86;
}
.tanka-error {
  max-width: 26rem;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(212, 202, 193, 0.9);
  background: var(--surface-strong);
  text-align: center;
}

.featured-controls {
  min-height: var(--featured-controls-height);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 0 0;
}
.featured-counter {
  min-width: 5.2rem;
  text-align: center;
  color: var(--sub);
  font-size: 0.95rem;
}
.control-button {
  min-width: 128px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: 0 8px 20px rgba(60, 43, 31, 0.05);
  cursor: pointer;
  font-weight: 700;
}
.control-button:hover,
.control-button:focus-visible {
  border-color: rgba(111, 68, 80, 0.54);
  color: var(--accent);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.profile-photo-frame,
.profile-copy,
.news-list,
.news-social,
.contact-card,
.works-group {
  background: var(--surface);
  border: 1px solid rgba(212, 202, 193, 0.88);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.profile-photo-frame {
  overflow: hidden;
}
.profile-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.profile-copy {
  padding: 28px 30px;
  background: rgba(255, 255, 255, 0.74);
}
.profile-copy h3 {
  margin-bottom: 12px;
  font-size: clamp(1.08rem, 1.8vw, 1.24rem);
}
.profile-copy p + p { margin-top: 14px; }
.profile-copy p { margin: 0; }
.profile-copy br { content: ""; }
.profile-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(212, 202, 193, 0.72);
}
.profile-external-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(212, 202, 193, 0.78);
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  color: var(--sub);
}
.profile-external-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
}
.profile-external-link--kokoro img {
  border-radius: 4px;
}
.profile-external-link span {
  font-size: 0.92rem;
  font-weight: 600;
}
.profile-external-link:hover,
.profile-external-link:focus-visible {
  border-color: rgba(111, 68, 80, 0.42);
  color: var(--ink);
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.works-group {
  padding: 20px;
  background: rgba(255, 255, 255, 0.78);
}
.works-group h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.works-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.works-group--poetry .works-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.works-group--other .works-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.work-item {
  display: grid;
  min-height: 100%;
  gap: 8px;
  padding: 12px 13px;
  border: 1px solid rgba(212, 202, 193, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}
.work-label,
.work-meta {
  color: var(--sub);
  font-size: 0.82rem;
  line-height: 1.5;
}
.work-text {
  min-width: 0;
}
.work-title-line {
  display: block;
  font-family: var(--body-font);
  line-height: 1.68;
}
.work-title {
  font-family: var(--body-font);
  font-size: 0.98rem;
  font-weight: 600;
}
.work-collaboration {
  margin-left: 0.08em;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}
.work-item.has-cover {
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: start;
}
.work-cover-button {
  width: 84px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: zoom-in;
  justify-self: end;
}
.work-cover {
  width: 84px;
  max-height: 116px;
  object-fit: contain;
  filter: saturate(0.92);
}

.news-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.news-list {
  padding: 10px 0;
}
.news-item {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 18px;
  padding: 18px 24px;
}
.news-item + .news-item {
  border-top: 1px solid rgba(212, 202, 193, 0.72);
}
.news-item time {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.news-social {
  padding: 18px 18px 20px;
  background: rgba(255,255,255,0.78);
}
.news-social__header h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.news-social__header p {
  margin: 0;
  color: var(--sub);
  font-size: 0.92rem;
}
.news-social__links {
  margin-top: 14px;
}
.subtle-external-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 202, 193, 0.78);
  background: rgba(255,255,255,0.88);
  color: var(--sub);
  font-size: 0.9rem;
}
.x-embed-shell {
  margin-top: 14px;
  min-height: 120px;
  max-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(212, 202, 193, 0.66);
  background: rgba(255,255,255,0.64);
}
.x-embed-shell .twitter-timeline {
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.contact-grid--single {
  grid-template-columns: 1fr;
}
.contact-card {
  padding: 24px;
  background: rgba(255,255,255,0.78);
}
.contact-card h3 {
  margin: 0 0 10px;
}
.contact-address {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}
.contact-note {
  margin: 10px 0 0;
  color: var(--sub);
}

.book-lightbox[hidden] {
  display: none;
}
.book-lightbox {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(32, 27, 24, 0.52);
}
.book-lightbox__panel {
  position: relative;
  width: min(420px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid rgba(212, 202, 193, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}
.book-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}
.book-lightbox__figure {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 0;
}
.book-lightbox__image {
  max-width: min(280px, 70vw);
  max-height: min(520px, 76svh);
  object-fit: contain;
}
.book-lightbox__title {
  color: var(--sub);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
}
body.lightbox-open {
  overflow: hidden;
}

.site-footer {
  width: var(--site-width);
  margin: 0 auto;
  padding: 24px 0 44px;
  color: var(--sub);
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  :root {
    --header-height: 70px;
    --featured-controls-height: 94px;
  }

  .nav-toggle {
    display: inline-flex;
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    z-index: 90;
    box-shadow: 0 8px 24px rgba(58, 43, 34, 0.08);
  }
  .global-nav {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    top: calc(max(14px, env(safe-area-inset-top)) + 56px);
    z-index: 80;
    min-width: 220px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(212, 202, 193, 0.9);
    border-radius: 20px;
    background: rgba(251, 249, 247, 0.98);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .global-nav.is-open { display: flex; }
  .global-nav a {
    padding: 13px 16px;
  }
  .global-nav a + a {
    border-top: 1px solid rgba(212, 202, 193, 0.72);
  }

  .profile-grid,
  .news-stack,
  .contact-grid,
  .works-grid,
  .works-list {
    grid-template-columns: 1fr;
  }
  .works-group--poetry .works-list,
  .works-group--other .works-list {
    grid-template-columns: 1fr;
  }
  .work-item.has-cover {
    grid-template-columns: 1fr;
  }
  .work-cover-button,
  .work-cover {
    display: none;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  :root {
    --site-width: calc(100vw - 24px);
    --content-rail: calc(100vw - 24px);
    --header-height: 64px;
    --featured-controls-height: 104px;
    --tanka-gap: 18px;
    --tanka-layout-width: calc(100vw - 40px);
  }
  body {
    font-size: 15px;
    line-height: 1.8;
  }
  .header-inner {
    width: var(--content-rail);
    padding: 12px 0;
  }
  .brand-ja {
    font-size: 1.12rem;
  }
  .brand-en {
    font-size: 0.58rem;
  }
  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
  .featured-hero {
    padding-top: 24px;
  }
  .featured-stage {
    min-height: calc(100svh - 42px);
  }
  .featured-tanka {
    transform: translateY(32px);
  }
  .tanka-layout {
    width: var(--tanka-layout-width);
    max-height: calc(100svh - var(--featured-controls-height) - 78px);
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    column-gap: 12px;
  }
  .tanka-body-wrap {
    max-width: none;
  }
  .tanka-body {
    font-size: clamp(1.12rem, 2.75svh, 1.48rem);
    line-height: 1.72;
    letter-spacing: 0.055em;
    max-height: min(62svh, 560px);
    max-width: calc(var(--tanka-layout-width) - 5.2rem);
  }
  .tanka-source {
    font-size: clamp(0.72rem, 1.32svh, 0.82rem);
    line-height: 1.55;
  }
  .featured-controls {
    gap: 10px;
    padding-top: 2px;
  }
  .control-button {
    min-width: 108px;
    min-height: 42px;
    font-size: 0.92rem;
  }
  .featured-counter {
    min-width: 4rem;
    font-size: 0.88rem;
  }
  .section {
    padding: 48px 0;
  }
  .section-heading,
  .section-heading.narrow {
    margin-bottom: 18px;
  }
  .section-heading h2 {
    font-size: 1.18rem;
  }
  .eyebrow {
    font-size: 0.56rem;
  }
  .profile-copy,
  .news-social,
  .contact-card,
  .works-group {
    padding: 20px 18px;
  }
}

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


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

.tanka-body-wrap {
  cursor: default;
}

.scroll-diagnostics {
  position: fixed;
  left: 10px;
  bottom: calc(var(--featured-controls-height) + 12px);
  z-index: 120;
  width: 52px;
  max-height: min(30svh, 220px);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(80, 71, 64, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(58, 43, 34, 0.12);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  backdrop-filter: blur(12px);
  overflow: auto;
}
.scroll-diagnostics__head {
  display: grid;
  align-items: center;
  gap: 6px;
}
.scroll-diagnostics__copy {
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.scroll-diagnostics__latest {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
}
.scroll-diagnostics__events {
  margin: 0;
  padding-left: 1.4em;
}
.scroll-diagnostics__events li + li {
  margin-top: 3px;
}
.scroll-diagnostics__events span {
  font-weight: 700;
}
.scroll-diagnostics__events code {
  display: block;
  color: var(--sub);
  font: inherit;
}
.scroll-diagnostics__textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none !important;
  }
  .nav-toggle span {
    transition: none !important;
  }
}


@media (max-width: 640px) {
  .profile-external-links {
    display: grid;
    grid-template-columns: 1fr;
  }
  .profile-external-link {
    justify-content: flex-start;
  }
  .news-social {
    padding: 18px 16px;
  }
  .x-embed-shell {
    max-height: 320px;
  }
}
