.ts-genre-map-body #content,
.ts-genre-map-body #content-in,
.ts-genre-map-body #main {
  max-width: none !important;
  width: 100% !important;
}

.ts-genre-map-body #content-in.content-in.wrap {
  display: block !important;
  padding: 0 !important;
}

.ts-genre-map-body #main.main {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.ts-genre-map-body #sidebar,
.ts-genre-map-body .sidebar {
  display: none !important;
}

.ts-genre-map-body .content {
  margin-top: 0 !important;
}

.ts-genre-map-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 174, 98, .18), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(14, 43, 71, .12), transparent 30rem),
    #f5efe4;
  color: #162638;
}

.ts-genre-map {
  --ts-ink: #162638;
  --ts-muted: #657080;
  --ts-card: rgba(255, 252, 245, .92);
  --ts-line: rgba(25, 39, 57, .14);
  --ts-navy: #18314f;
  --ts-red: #9f3d31;
  --ts-mustard: #b58a37;
  --ts-green: #687a5a;
  --ts-blue: #56748f;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 52px) clamp(14px, 3vw, 30px) 56px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}

.ts-genre-map * {
  box-sizing: border-box;
}

.ts-genre-map__hero {
  max-width: 850px;
  margin: 0 auto 24px;
  text-align: center;
}

.ts-genre-map__eyebrow {
  margin: 0 0 10px;
  color: var(--ts-mustard);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.ts-genre-map__hero h1 {
  margin: 0;
  color: var(--ts-ink);
  font-size: clamp(1.9rem, 5.4vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.ts-genre-map__hero p:not(.ts-genre-map__eyebrow) {
  margin: 16px auto 0;
  color: var(--ts-muted);
  font-size: clamp(.95rem, 2vw, 1.08rem);
  line-height: 1.9;
}

.ts-genre-map__shell {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(290px, 360px);
  gap: 16px;
  align-items: stretch;
  min-height: 760px;
}

.ts-genre-map__controls,
.ts-genre-map__stage,
.ts-genre-map__panel {
  border: 1px solid rgba(22, 38, 56, .12);
  border-radius: 24px;
  background: var(--ts-card);
  box-shadow: 0 18px 48px rgba(48, 38, 22, .08);
  backdrop-filter: blur(14px);
}

.ts-genre-map__controls {
  padding: 18px;
}

.ts-genre-map__search,
.ts-genre-map__filters label {
  display: grid;
  gap: 6px;
}

.ts-genre-map__search span,
.ts-genre-map__filters span {
  color: var(--ts-muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ts-genre-map input,
.ts-genre-map select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(22, 38, 56, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  color: var(--ts-ink);
  font: 600 .92rem/1.3 "Helvetica Neue", Arial, sans-serif;
  outline: none;
  padding: 0 12px;
}

.ts-genre-map input:focus,
.ts-genre-map select:focus {
  border-color: rgba(181, 138, 55, .72);
  box-shadow: 0 0 0 3px rgba(181, 138, 55, .14);
}

.ts-genre-map__filters {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.ts-genre-map__actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ts-genre-map__actions button,
.ts-genre-map__panel button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--ts-navy);
  color: #fff;
  cursor: pointer;
  font: 800 .86rem/1 "Helvetica Neue", Arial, sans-serif;
  padding: 0 16px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ts-genre-map__actions button:nth-child(2) {
  background: var(--ts-mustard);
}

.ts-genre-map__actions button:hover,
.ts-genre-map__panel button:hover {
  box-shadow: 0 10px 22px rgba(22, 38, 56, .15);
  transform: translateY(-1px);
}

.ts-genre-map__hint {
  margin: 16px 0 0;
  color: var(--ts-muted);
  font-size: .83rem;
  line-height: 1.7;
}

.ts-genre-map__legend,
.ts-genre-map__category-relations {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 38, 56, .1);
}

.ts-genre-map__legend h2,
.ts-genre-map__category-relations h2 {
  margin: 0 0 10px;
  color: var(--ts-ink);
  font: 900 .82rem/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .06em;
}

.ts-genre-map__legend p,
.ts-genre-map__category-relations p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0;
  color: var(--ts-muted);
  font: 800 .76rem/1.45 "Helvetica Neue", Arial, sans-serif;
}

.ts-line-sample {
  width: 42px;
  height: 0;
  border-top: 3px solid #b58a37;
  flex: 0 0 auto;
}

.ts-line-sample--dashed {
  border-color: #9f3d31;
  border-top-style: dashed;
}

.ts-line-sample--dotted {
  border-color: #718295;
  border-top-style: dotted;
}

.ts-line-sample--fusion {
  border-color: #687a5a;
  border-top-width: 5px;
}

.ts-category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
  flex: 0 0 auto;
}

.ts-category-arrow {
  color: var(--ts-mustard);
}

.ts-genre-map__category-relations em {
  margin-left: auto;
  color: var(--ts-red);
  font-style: normal;
  font-size: .72rem;
  white-space: nowrap;
}

.ts-genre-map__stage {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background:
    linear-gradient(rgba(24, 49, 79, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 49, 79, .045) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(255, 255, 255, .95), rgba(246, 238, 224, .72));
  background-size: 34px 34px, 34px 34px, auto;
  touch-action: none;
}

.ts-genre-map__svg {
  width: 100%;
  height: 100%;
  min-height: 760px;
  display: block;
  cursor: grab;
}

.ts-genre-map__svg.is-panning {
  cursor: grabbing;
}

.ts-genre-map__status {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  max-width: calc(100% - 36px);
  border: 1px solid rgba(22, 38, 56, .1);
  border-radius: 999px;
  background: rgba(255, 252, 245, .86);
  color: var(--ts-muted);
  font: 800 .78rem/1.35 "Helvetica Neue", Arial, sans-serif;
  padding: 9px 13px;
  pointer-events: none;
}

.ts-genre-map__edge {
  fill: none;
  stroke-linecap: round;
  opacity: .42;
}

.ts-genre-map__edge-label {
  fill: rgba(22, 38, 56, .68);
  paint-order: stroke;
  stroke: rgba(255, 252, 245, .9);
  stroke-width: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  pointer-events: none;
}

.ts-genre-map__era-line {
  stroke: rgba(24, 49, 79, .16);
  stroke-width: 1;
  stroke-dasharray: 4 8;
}

.ts-genre-map__spread-line {
  stroke: rgba(22, 38, 56, .07);
  stroke-width: 1;
}

.ts-genre-map__era-label,
.ts-genre-map__axis-label {
  fill: rgba(22, 38, 56, .66);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  pointer-events: none;
}

.ts-genre-map__era-label {
  font-size: 12px;
  letter-spacing: .06em;
}

.ts-genre-map__axis-label {
  fill: rgba(22, 38, 56, .5);
  font-size: 12px;
  letter-spacing: .04em;
}

.ts-genre-map__edge--parent,
.ts-genre-map__edge--child {
  stroke: #b58a37;
}

.ts-genre-map__edge--related {
  stroke: #718295;
  stroke-dasharray: 2 8;
}

.ts-genre-map__edge--influenced,
.ts-genre-map__edge--influenced_by {
  stroke: #9f3d31;
  stroke-dasharray: 10 7;
}

.ts-genre-map__edge--fusion {
  stroke: #687a5a;
  stroke-width: 2px;
  stroke-dasharray: 18 6;
}

.ts-genre-map__node {
  cursor: pointer;
}

.ts-genre-map__node circle {
  stroke: rgba(255, 255, 255, .92);
  stroke-width: 3;
  filter: drop-shadow(0 10px 12px rgba(22, 38, 56, .2));
  transition: r .18s ease, stroke-width .18s ease, filter .18s ease;
}

.ts-genre-map__node.is-selected circle {
  stroke: #fff4c7;
  stroke-width: 5;
  filter: drop-shadow(0 0 18px rgba(181, 138, 55, .55));
}

.ts-genre-map__node:hover circle {
  filter: drop-shadow(0 0 18px rgba(24, 49, 79, .34));
}

.ts-genre-map__node text {
  fill: var(--ts-ink);
  paint-order: stroke;
  stroke: rgba(255, 252, 245, .9);
  stroke-width: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  pointer-events: none;
}

.ts-genre-map__node-ja {
  fill: var(--ts-muted) !important;
  font-size: 11px;
  font-weight: 800 !important;
}

.ts-genre-map__panel {
  max-height: 760px;
  overflow: auto;
  padding: 22px;
}

.ts-genre-map__panel-empty {
  margin: 0;
  color: var(--ts-muted);
  line-height: 1.8;
}

.ts-genre-detail__notice {
  display: none;
  margin: 0 0 12px;
  color: var(--ts-red);
  font: 900 .78rem/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ts-genre-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ts-genre-detail__pill {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(24, 49, 79, .08);
  color: var(--ts-navy);
  font: 800 .76rem/1 "Helvetica Neue", Arial, sans-serif;
  padding: 7px 10px;
}

.ts-genre-detail h2 {
  margin: 0;
  color: var(--ts-ink);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.08;
}

.ts-genre-detail__ja {
  margin: 5px 0 14px;
  color: var(--ts-muted);
  font: 800 .9rem/1.4 "Helvetica Neue", Arial, sans-serif;
}

.ts-genre-detail__summary,
.ts-genre-detail__origin {
  color: #354354;
  line-height: 1.82;
}

.ts-genre-detail__section {
  margin-top: 20px;
}

.ts-genre-detail__section h3 {
  margin: 0 0 10px;
  color: var(--ts-ink);
  font-size: 1rem;
  letter-spacing: .02em;
}

.ts-genre-detail__chips,
.ts-genre-detail__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ts-genre-detail__chip,
.ts-genre-detail__mini-link {
  border: 1px solid rgba(22, 38, 56, .12);
  border-radius: 999px;
  background: #fff;
  color: var(--ts-ink);
  font: 800 .82rem/1 "Helvetica Neue", Arial, sans-serif;
  padding: 8px 11px;
  text-decoration: none !important;
}

.ts-genre-detail__mini-link {
  cursor: pointer;
}

.ts-genre-detail__cards {
  display: grid;
  gap: 9px;
}

.ts-genre-detail__card {
  display: block;
  border: 1px solid rgba(22, 38, 56, .11);
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
  color: inherit;
  padding: 12px;
  text-decoration: none !important;
  transition: transform .18s ease, border-color .18s ease;
}

.ts-genre-detail__card:hover {
  border-color: rgba(181, 138, 55, .46);
  transform: translateY(-1px);
}

.ts-genre-detail__card strong {
  display: block;
  color: var(--ts-ink);
  font: 900 .96rem/1.4 "Helvetica Neue", Arial, sans-serif;
}

.ts-genre-detail__card span {
  display: block;
  margin-top: 3px;
  color: var(--ts-muted);
  font: 700 .8rem/1.45 "Helvetica Neue", Arial, sans-serif;
}

.ts-genre-detail__article-group {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ts-genre-detail__article-group h4 {
  margin: 10px 0 0;
  color: var(--ts-red);
  font: 900 .82rem/1 "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 1120px) {
  .ts-genre-map__shell {
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  }

  .ts-genre-map__panel {
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .ts-genre-map-page {
    overflow-x: hidden;
  }

  .ts-genre-map {
    padding: 18px 8px 34px;
  }

  .ts-genre-map__hero {
    text-align: left;
    padding: 0 4px;
  }

  .ts-genre-map__hero h1 {
    font-size: clamp(1.62rem, 8vw, 2.35rem);
    letter-spacing: -.035em;
  }

  .ts-genre-map__hero p:not(.ts-genre-map__eyebrow) {
    font-size: .9rem;
    line-height: 1.75;
  }

  .ts-genre-map__shell {
    display: block;
    min-height: 0;
  }

  .ts-genre-map__controls {
    position: static;
    z-index: 5;
    margin-bottom: 10px;
    border-radius: 18px;
    padding: 12px;
  }

  .ts-genre-map__filters {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ts-genre-map__actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ts-genre-map__actions button {
    font-size: .76rem;
    padding: 0 10px;
  }

  .ts-genre-map__hint {
    display: none;
  }

  .ts-genre-map__legend,
  .ts-genre-map__category-relations {
    display: none;
  }

  .ts-genre-map__stage {
    min-height: 560px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 20px;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
  }

  .ts-genre-map__svg {
    width: 920px;
    min-width: 920px;
    max-width: none;
    min-height: 560px;
  }

  .ts-genre-map__status {
    left: 10px;
    top: 10px;
    max-width: calc(100vw - 36px);
    border-radius: 16px;
    font-size: .72rem;
    padding: 8px 10px;
  }

  .ts-genre-map__era-label {
    font-size: 11px;
  }

  .ts-genre-map__axis-label {
    font-size: 10px;
  }

  .ts-genre-map__node text {
    font-size: 11px;
  }

  .ts-genre-map__node-ja {
    font-size: 10px;
  }

  .ts-genre-map__panel {
    position: static;
    z-index: 6;
    max-height: none;
    margin-top: 10px;
    border-radius: 20px;
    padding: 16px;
    overflow: visible;
  }

  .ts-genre-map__panel.is-revealed {
    animation: ts-panel-reveal .95s ease both;
  }

  .ts-genre-detail__notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: rgba(159, 61, 49, .08);
    padding: 8px 11px;
  }

  .ts-genre-detail__section {
    margin-top: 16px;
  }

  .ts-genre-detail__card {
    border-radius: 14px;
    padding: 10px;
  }
}

@keyframes ts-panel-reveal {
  0% {
    border-color: rgba(181, 138, 55, .95);
    box-shadow: 0 0 0 4px rgba(181, 138, 55, .2), 0 22px 54px rgba(48, 38, 22, .14);
    transform: translateY(8px);
  }

  100% {
    border-color: rgba(22, 38, 56, .12);
    box-shadow: 0 18px 48px rgba(48, 38, 22, .08);
    transform: translateY(0);
  }
}
