.detail-shell {
  padding-bottom: 28px;
}

body {
  overflow-x: hidden;
}

.detail-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.artwork-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.62fr) minmax(210px, 0.34fr);
  gap: 52px;
  align-items: start;
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--line);
}

.artwork-detail > *,
.artwork-column,
.detail-art-frame,
.detail-copy,
.detail-sidebar {
  min-width: 0;
}

.detail-art-frame {
  position: relative;
  margin: 0;
  padding: 8px;
  border: 1px solid #caa75f;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: var(--shadow);
}

.detail-art-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(122, 83, 31, 0.32);
}

.detail-art-frame.is-picking img {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%237a5525' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 22 1.4-4.2L15.8 5.4l2.8 2.8L6.2 20.6 2 22Z'/%3E%3Cpath d='M14.4 6.8l2.8 2.8M13.8 3.2 20.8 10.2M16.2 1.8 22.2 7.8'/%3E%3C/svg%3E") 4 28, crosshair;
}

.color-pick-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #fff8eb;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(75, 43, 17, 0.7), 0 6px 18px rgba(75, 43, 17, 0.22);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.artwork-actions {
  display: grid;
  grid-template-columns: repeat(var(--action-count, 4), minmax(0, 1fr));
  width: min(500px, 78%);
  margin: 20px auto 0;
  border: 1px solid #cda867;
  background: rgba(255, 248, 235, 0.78);
  box-shadow: 0 10px 28px rgba(91, 54, 11, 0.07);
}

.artwork-actions button,
.artwork-actions a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 64px;
  border: 0;
  border-right: 1px solid rgba(205, 168, 103, 0.55);
  background: transparent;
  color: #7a5525;
  cursor: pointer;
}

.artwork-actions [hidden] {
  display: none;
}

.artwork-actions:not(.has-video) [data-color-picker-action] {
  border-right: 0;
}

.artwork-actions a {
  text-decoration: none;
}

.artwork-actions button:last-child,
.artwork-actions a:last-child {
  border-right: 0;
}

.artwork-actions svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.artwork-actions button.is-active {
  color: #b98218;
  background: rgba(201, 154, 43, 0.12);
}

.artwork-actions button.is-active svg:not([data-no-fill]) {
  fill: currentColor;
}

.artwork-actions button:hover,
.artwork-actions a:hover {
  background: rgba(201, 154, 43, 0.1);
}

.color-playground,
.sound-playground {
  width: min(500px, 78%);
  margin: 14px auto 0;
  padding: 18px 20px;
  border: 1px solid rgba(205, 168, 103, 0.72);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 12px 30px rgba(91, 54, 11, 0.06);
}

.color-playground-kicker,
.sound-playground-kicker {
  margin: 0 0 6px;
  color: #b98218;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.color-playground-status,
.sound-playground-status {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.color-result {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
}

.color-result-swatch {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(122, 83, 31, 0.26);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 241, 0.38);
}

.color-result strong {
  display: block;
  color: var(--ink);
  font-family: var(--title-serif);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.color-result span {
  display: block;
  margin-top: 4px;
  color: #7c674d;
  font-size: 14px;
}

.detail-copy {
  padding-top: 82px;
}

.detail-copy .eyebrow,
.detail-sidebar h2,
.story-section h2,
.media-section h2,
.detail-bottom h2 {
  color: #936411;
  font-family: var(--serif);
}

.detail-copy h1 {
  margin: 16px 0 0;
  font-family: var(--title-serif);
  font-size: clamp(40px, 3.6vw, 56px);
  line-height: 1.16;
  letter-spacing: 0;
  font-kerning: normal;
  word-break: keep-all;
}

.detail-copy,
.story-section p,
.dna-notes p,
.side-facts p {
  overflow-wrap: anywhere;
}

.english-title {
  margin: 14px 0 0;
  color: #8b6e3c;
  font-family: var(--serif);
  font-size: 18px;
}

.lead,
.summary {
  color: #5d4938;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: 0;
}

.lead {
  margin: 30px 0 0;
}

.summary {
  margin: 14px 0 0;
}

.detail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 34px;
}

.button-ghost {
  border: 1px solid #cda867;
  background: rgba(255, 250, 241, 0.7);
  color: #6b4214;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 38px;
  margin: 0;
  color: #5a4737;
  font-size: 15px;
}

.meta-grid div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-column: 1 / -1;
  gap: 22px;
}

.meta-grid dt {
  color: #7c6a58;
}

.meta-grid dd {
  margin: 0;
}

.detail-sidebar {
  min-height: 100%;
  padding-left: 36px;
  border-left: 1px solid #cda867;
}

.detail-sidebar h2 {
  margin: 12px 0 0;
  font-size: 21px;
  line-height: 1.45;
}

.sidebar-rule {
  width: 34px;
  height: 2px;
  margin: 18px 0;
  background: #cda867;
}

.palette-legend {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0 0 26px;
  border-bottom: 1px solid #cda867;
  list-style: none;
}

.palette-legend li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  color: #735a42;
  font-family: var(--serif);
  font-size: 14px;
}

.palette-legend i {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(86, 54, 21, 0.12);
  background: var(--c);
}

.palette-legend span {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.side-facts {
  padding-top: 24px;
}

.side-facts h3 {
  margin: 0 0 6px;
  color: #8a5b17;
  font-family: var(--serif);
  font-size: 16px;
}

.side-facts p {
  margin: 0 0 22px;
  color: #5d4938;
  font-size: 14px;
  line-height: 1.7;
}

.story-section {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--line);
}

.story-section + .story-section {
  padding-top: 34px;
}

.story-section h2 {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(34px, 3vw, 48px);
  letter-spacing: 0;
}

.story-section p {
  max-width: 1130px;
  margin: 0 0 14px;
  color: #443123;
  font-size: 18px;
  line-height: 2;
}

.dna-notes {
  display: grid;
  grid-template-columns: repeat(var(--action-count, 4), minmax(0, 1fr));
  gap: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.dna-notes article {
  min-height: 150px;
  padding: 0 32px;
  border-right: 1px solid #d4b982;
}

.dna-notes article:first-child {
  padding-left: 6px;
}

.dna-notes article:last-child {
  border-right: 0;
  padding-right: 6px;
}

.dna-notes h3 {
  margin: 0 0 14px;
  color: #936411;
  font-family: var(--serif);
  font-size: 19px;
}

.dna-notes p {
  margin: 0;
  color: #5a4634;
  line-height: 1.9;
}

.media-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px;
  padding: 34px 0 42px;
  border-bottom: 1px solid var(--line);
}

.media-section h2,
.detail-bottom h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.video-card {
  position: relative;
  overflow: hidden;
  background: #2b1b12;
  box-shadow: 0 12px 35px rgba(91, 54, 11, 0.12);
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.play-button {
  position: absolute;
  left: 18px;
  bottom: 36px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(29, 18, 11, 0.58);
  color: #fff8e9;
}

.video-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 0 14px;
  background: rgba(25, 15, 8, 0.68);
  color: #fff8e9;
  font-size: 13px;
}

.video-controls i {
  height: 3px;
  background: linear-gradient(90deg, #fff8e9 0 35%, rgba(255, 248, 233, 0.35) 35%);
}

.sound-inner {
  padding: 24px;
  background: linear-gradient(145deg, #f7ead2, #efe0c1);
  box-shadow: 0 10px 28px rgba(91, 54, 11, 0.07);
}

.sound-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sound-title > span,
.player-actions button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: #bd8420;
  color: #fff8e9;
}

.sound-title strong,
.sound-title small {
  display: block;
}

.sound-title small {
  margin-top: 2px;
  color: #725638;
}

.sound-inner p {
  margin: 22px 0;
  color: #5a4634;
  line-height: 1.8;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
}

.waveform i {
  width: 3px;
  height: calc(9px + var(--h, 1) * 3px);
  background: #bd8420;
}

.waveform i:nth-child(2n) { --h: 5; }
.waveform i:nth-child(3n) { --h: 8; }
.waveform i:nth-child(4n) { --h: 3; }

.player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 10px;
  color: #9a6b20;
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-grid a {
  display: grid;
  gap: 8px;
}

.related-grid img {
  width: 100%;
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
}

.related-grid strong {
  font-family: var(--serif);
  font-size: 16px;
}

.related-grid span {
  color: #7b674f;
  font-size: 13px;
}

.detail-bottom {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.tag-list,
.palette-strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-list a {
  min-width: 72px;
  padding: 7px 16px;
  border: 1px solid #d0ad70;
  background: rgba(255, 250, 241, 0.62);
  color: #7b5523;
  text-align: center;
  font-size: 14px;
}

.palette-strip-list .palette-bar {
  width: 146px;
  height: 20px;
  border: 1px solid rgba(86, 54, 21, 0.12);
}

.detail-footer {
  padding: 18px 0 0;
  color: #8a7968;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .artwork-detail {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .detail-copy {
    padding-top: 0;
  }

  .detail-sidebar {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) 1fr;
    gap: 28px;
    padding: 26px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .palette-legend {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    grid-column: 1 / -1;
  }

  .side-facts {
    padding-top: 0;
  }

  .media-section {
    grid-template-columns: 1fr 0.8fr;
  }

  .related-works {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .detail-shell {
    width: calc(100vw - 28px);
    max-width: 1400px;
  }

  .artwork-detail {
    padding-top: 26px;
  }

  .artwork-actions {
    width: 100%;
  }

  .detail-copy h1 {
    font-size: 40px;
  }

  .meta-grid div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-sidebar,
  .dna-notes,
  .media-section,
  .detail-bottom {
    grid-template-columns: 1fr;
  }

  .palette-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dna-notes article {
    min-height: auto;
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 185, 130, 0.75);
  }

  .dna-notes article:last-child {
    border-bottom: 0;
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .related-grid strong {
    font-size: 14px;
  }
}

@media (max-width: 540px) {
  .detail-header .brand {
    gap: 10px;
  }

  .detail-header .brand-mark {
    width: 38px;
    height: 44px;
  }

  .detail-header .brand strong {
    font-size: 18px;
  }

  .detail-header .brand em {
    font-size: 13px;
  }

  .detail-header .header-actions {
    gap: 4px;
  }

  .detail-header .header-actions button {
    width: 30px;
    height: 30px;
  }

  .detail-header .header-actions button:not(:first-child) {
    display: none;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .detail-copy p,
  .story-section p,
  .dna-notes p {
    word-break: break-all;
  }

  .lead {
    font-size: 18px;
  }

  .story-section h2 {
    font-size: 34px;
  }

  .story-section p {
    font-size: 16px;
  }

  .palette-legend li {
    gap: 10px;
    font-size: 12px;
  }

  .palette-legend i {
    width: 34px;
    height: 34px;
  }
}

.sound-playground-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.sound-playground-title > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #bd8420;
  color: #fff8e9;
}

.sound-playground-title strong,
.sound-playground-title small {
  display: block;
}

.sound-playground-title small,
.sound-playground-status {
  color: #725638;
}

.sound-playground p[data-sound-description] {
  margin: 16px 0 14px;
  color: #5a4634;
  line-height: 1.8;
}

.sound-playground audio {
  width: 100%;
  margin-top: 6px;
}

.media-section-related .related-works {
  width: 100%;
}
