:root {
  --bg: #ffffff;
  --text: #202020;
  --text-soft: #353535;
  --muted: #7d7d7d;
  --line: #e5e5e5;
  --line-strong: #cfcfcf;
  --content-width: 760px;
  --section-pad-x: 20px;
  --anchor-offset: 130px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.78;
  letter-spacing: 0.015em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

main {
  width: 100%;
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.nav a {
  color: #4a4a4a;
  transition: color 0.18s ease;
}

.nav a:hover {
  color: #111;
}

.nav-home {
  margin-right: auto;
  color: #111;
  font-weight: 600;
}

.section {
  padding: 64px var(--section-pad-x);
}

.section-inner {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

#works .section-inner {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.hero {
  min-height: auto;
  display: block;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero .section-inner {
  width: min(100%, var(--content-width));
  max-width: none;
  margin: 0 auto;
}

h1 {
  margin: 0 0 22px;
  font-size: 1.5rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1d1d1d;
}

.hero h1 {
  margin-bottom: 22px;
}

h2 {
  margin: 0 0 22px;
  font-size: 1.1rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1d1d1d;
}

h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 600;
  color: #222;
}

p {
  margin: 0 0 1.2em;
}

.lead {
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.78;
  color: var(--text-soft);
}

.hero .lead {
  max-width: none;
}

.meta,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

#aboutContent,
#contactContent,
#boardList,
#workPage,
#memberPage {
  width: 100%;
  max-width: none;
}

#aboutContent p,
#contactContent p,
#memberPage p,
#workPage p {
  max-width: none;
}

#aboutContent,
#contactContent {
  font-size: 0.98rem;
  color: var(--text-soft);
}

.person-chip,
.member-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.person-chip:hover,
.member-detail-link:hover {
  border-color: var(--line-strong);
  background: #fcfcfc;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #fff;
  flex: 0 0 auto;
  color: #4a4a4a;
}

.thumb {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

.thumb-placeholder {
  display: block;
  width: 64px;
  height: 44px;
  border: 1px solid var(--line);
  background: #f4f4f4;
}

#worksGraph {
  overflow-x: auto;
  padding: 8px 0 4px;
  background: transparent;
  border: none;
}

.graph-svg {
  display: block;
  background: transparent;
}

#worksGraph svg text {
  letter-spacing: 0.01em;
  pointer-events: none;
}

.graph-work-label-bg {
  pointer-events: none;
}

.graph-work-link,
.graph-member-link,
.graph-node-button {
  cursor: pointer;
}

.graph-work-image,
.graph-work-overlay,
.graph-work-label-bg {
  transition:
    fill 0.22s ease,
    stroke 0.22s ease,
    opacity 0.22s ease,
    filter 0.22s ease;
}

.graph-member-circle {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1);
  transition:
    transform 0.18s ease,
    stroke 0.18s ease,
    fill 0.18s ease;
}

.graph-node-button circle:last-child {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1);
  transition:
    transform 0.18s ease,
    fill 0.18s ease,
    stroke 0.18s ease;
}

.graph-work-link:hover .graph-work-image,
.graph-work-link:focus-visible .graph-work-image {
  filter: saturate(1.04) contrast(1.02);
}

.graph-work-link:hover .graph-work-overlay,
.graph-work-link:focus-visible .graph-work-overlay {
  fill: rgba(255, 255, 255, 0.3);
  stroke: #bdbdbd;
}

.graph-member-link:hover .graph-member-circle,
.graph-member-link:focus-visible .graph-member-circle,
.graph-member-link.bubble-open .graph-member-circle {
  stroke: #666;
  fill: #fafafa;
  transform: scale(1.14);
}

.graph-node-button {
  outline: none;
}

.graph-node-button:hover circle:last-child,
.graph-node-button:focus-visible circle:last-child,
.graph-node-button.bubble-open circle:last-child {
  stroke: #666;
  fill: #fafafa;
  transform: scale(1.14);
}

.bubble-trigger {
  cursor: pointer;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.button,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.button:hover,
.icon-button:hover {
  background: #fafafa;
  border-color: var(--line-strong);
}

.button {
  padding: 10px 16px;
  font-size: 0.92rem;
}

.icon-button {
  width: 36px;
  height: 36px;
}

.board-note {
  margin-bottom: 16px;
}

.board-item {
  padding: 0;
}

.board-item + .board-item {
  margin-top: 14px;
}

.board-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px 18px;
}

.board-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.board-person,
.board-date,
.board-comment,
.board-works {
  min-width: 0;
}

.board-person {
  font-size: 0.9rem;
  color: #222;
}

.board-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  padding-top: 2px;
}

.board-comment {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.85;
}

.board-works {
  margin-bottom: 12px;
}

.board-member-link,
.board-guest {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

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

.board-member-avatar,
.board-guest-name {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  background: #fff;
  color: #4a4a4a;
  flex: 0 0 auto;
}

.board-member-avatar {
  border-radius: 999px;
  border: 1px solid #bbbbbb;
  transform: scale(1);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.board-member-link:hover .board-member-avatar,
.board-member-link:focus-visible .board-member-avatar {
  border-color: #666;
  background: #fafafa;
  transform: scale(1.14);
}

.board-guest-name {
  border: 1px solid var(--line);
  cursor: default;
}

.board-member-name {
  font-size: 0.92rem;
  line-height: 1.4;
  color: #222;
}

.board-works-group {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
}

.board-works-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.board-works-note {
  flex: 0 0 auto;
  font-size: 0.84rem;
  line-height: 1;
  color: var(--muted);
  transform: translateY(-2px);
}

.work-ref {
  display: inline-block;
  line-height: 0;
  flex: 0 0 auto;
}

.work-ref .thumb,
.work-ref .thumb-placeholder {
  width: 72px;
  height: 50px;
  object-fit: cover;
  border: none;
  background: #f4f4f4;
}

.board-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.board-image-link {
  display: block;
  width: 140px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #fafafa;
}

.board-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(340px, calc(100vw - 24px));
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cfcfcf;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.7;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateX(10px) scale(0.985);
  transform-origin: left center;
  transition:
    opacity 0.18s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tooltip[hidden] {
  display: none;
}

.tooltip.is-visible {
  opacity: 1;
}

.tooltip.is-right.is-visible {
  transform: translateX(0) scale(1);
}

.tooltip.is-left {
  transform: translateX(-10px) scale(0.985);
  transform-origin: right center;
}

.tooltip.is-left.is-visible {
  transform: translateX(0) scale(1);
}

.tooltip.is-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.tooltip.is-right::after {
  left: -6px;
  border-left: 1px solid #cfcfcf;
  border-bottom: 1px solid #cfcfcf;
}

.tooltip.is-left::after {
  right: -6px;
  border-right: 1px solid #cfcfcf;
  border-top: 1px solid #cfcfcf;
}

.bubble-card {
  display: grid;
  gap: 10px;
}

.bubble-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bubble-card-name {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  color: #1c1c1c;
}

.bubble-card-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.bubble-card-text {
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--text-soft);
}

.page-hero {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.page-hero img {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--line);
}

.work-list-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.work-tile {
  width: 180px;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.work-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  background: #fcfcfc;
}

.work-tile img,
.work-tile-placeholder {
  width: 100%;
  height: 126px;
  object-fit: cover;
  background: #f4f4f4;
}

.work-tile .caption {
  padding: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.member-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 24px));
  margin: 48px auto;
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.post-form input[type="text"],
.post-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  line-height: 1.7;
}

.post-form input[type="text"]:focus,
.post-form textarea:focus {
  outline: none;
  border-color: #888;
}

.checkbox-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"],
.checkbox-input {
  margin: 0;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

#workBoard,
#memberBoard {
  max-width: 100%;
}

.works-mobile-list {
  display: grid;
  gap: 18px;
}

.works-mobile-card {
  border: 1px solid var(--line);
  background: #fff;
}

.works-mobile-thumb img,
.works-mobile-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f4f4f4;
  border-bottom: 1px solid var(--line);
}

.works-mobile-body {
  padding: 14px;
}

.works-mobile-period {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.works-mobile-title {
  margin-bottom: 8px;
}

.works-mobile-summary {
  font-size: 0.93rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.works-mobile-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 641px) {
  .works-mobile-list {
    display: none;
  }
}

@media (max-width: 800px) {
  :root {
    --section-pad-x: 18px;
  }

  .section {
    padding: 48px var(--section-pad-x);
  }

  .section-inner {
    width: 100%;
    max-width: var(--content-width);
  }

  .hero {
    min-height: auto;
    padding-top: 68px;
    padding-bottom: 56px;
  }

  .nav {
    gap: 16px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .nav-home {
    margin-right: 12px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tooltip {
    max-width: calc(100vw - 20px);
  }

  .modal-panel {
    margin: 24px auto;
    padding: 18px;
  }

  .work-tile {
    width: calc(50% - 7px);
    min-width: 150px;
  }

  #worksGraph {
    padding-top: 2px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad-x: 14px;
  }

  .site-header {
    backdrop-filter: blur(8px);
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
    white-space: normal;
    overflow-x: visible;
  }

  .nav-home {
    margin-right: 0;
    font-size: 0.98rem;
  }

  .nav a:not(.nav-home) {
    display: inline-block;
    margin-right: 14px;
    font-size: 0.84rem;
  }

  .section {
    padding: 38px var(--section-pad-x);
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 40px;
  }

  h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  h2 {
    margin-bottom: 16px;
  }

  .lead,
  #aboutContent,
  #contactContent,
  .board-comment,
  .bubble-card-text {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .button,
  .icon-button,
  .person-chip,
  .member-detail-link {
    min-height: 44px;
  }

  .section-head {
    gap: 12px;
  }

  .board-item + .board-item {
    margin-top: 12px;
  }

  .board-card {
    padding: 14px;
  }

  .board-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .board-date {
    padding-top: 0;
    font-size: 0.8rem;
  }

  .board-comment {
    font-size: 0.94rem;
    line-height: 1.9;
  }

  .board-works-group {
    gap: 8px;
  }

  .board-works-note {
    font-size: 0.8rem;
    transform: translateY(-1px);
  }

  .work-ref .thumb,
  .work-ref .thumb-placeholder {
    width: 68px;
    height: 48px;
  }

  .modal-panel {
    width: calc(100vw - 16px);
    margin: 12px auto;
    padding: 16px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 12px;
  }

  .tooltip {
    left: 12px !important;
    right: 12px;
    bottom: 12px;
    top: auto !important;
    max-width: none;
    width: auto;
    transform: translateY(10px) scale(0.985);
    transform-origin: center bottom;
  }

  .tooltip.is-left,
  .tooltip.is-right {
    transform: translateY(10px) scale(0.985);
  }

  .tooltip.is-visible,
  .tooltip.is-left.is-visible,
  .tooltip.is-right.is-visible {
    transform: translateY(0) scale(1);
  }

  .tooltip.is-bubble::after {
    display: none;
  }

  .board-images {
    gap: 8px;
    margin-bottom: 12px;
  }

  .board-image-link {
    width: calc(50% - 4px);
  }

  .works-mobile-members .member-detail-link {
    min-height: 36px;
    padding: 6px 10px;
    gap: 7px;
    font-size: 0.84rem;
    color: var(--muted);
  }

  .works-mobile-members .member-detail-link .avatar {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .works-mobile-members .member-detail-link span:last-child {
    font-size: 0.84rem;
    line-height: 1.4;
    color: #7f7f7f;
  }
}

@media (max-width: 520px) {
  body {
    line-height: 1.7;
  }

  h1 {
    font-size: 2rem;
  }

  .lead {
    font-size: 0.96rem;
  }

  .work-tile {
    width: 100%;
  }

  .person-chip,
  .member-detail-link {
    max-width: 100%;
  }
}

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-external-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.member-external-link:hover {
  border-color: var(--line-strong);
  background: #fcfcfc;
}

.member-icon-chip {
  padding: 6px;
}

.member-icon-chip .avatar {
  width: 30px;
  height: 30px;
}

.member-page-icon {
  width: fit-content;
}

.member-page-icon .avatar {
  width: 30px;
  height: 30px;
}

section[id] {
  scroll-margin-top: var(--anchor-offset);
}