.result {
  padding: 30px;
  border: 1px solid rgba(119, 172, 223, 0.38);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(49, 102, 157, 0.13);
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
}

.summary-section li.summary-item-playing {
  background: rgba(47, 140, 255, 0.08);
  border-top-color: rgba(47, 140, 255, 0.3);
  border-bottom-color: rgba(47, 140, 255, 0.3);
}

.result-header-top {
  display: grid;
  grid-template-columns: minmax(220px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.result-header > :first-child {
  min-width: 0;
}

.result-title-block {
  min-width: 0;
}

.result-header h1,
.result-header h2 {
  overflow-wrap: anywhere;
}

#summary-detail #detail-title {
  max-width: none;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  min-width: 0;
  gap: 10px;
}

.result-actions .secondary-button {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.summary-more-actions {
  position: relative;
  min-width: 0;
}

.summary-more-actions > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  cursor: pointer;
  list-style: none;
}

.summary-more-actions > summary::-webkit-details-marker {
  display: none;
}

.summary-more-actions > summary::after {
  content: "\22ef";
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
}

.summary-more-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 280px;
  max-width: calc(100vw - 32px);
  gap: 4px;
  padding: 8px;
  border: 1px solid #b8d1eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(18, 35, 59, 0.18);
}

.summary-more-menu .share-actions,
.summary-more-menu .share-menu-button {
  width: 100%;
}

.summary-more-menu .share-menu-button {
  justify-content: start;
  border: 0;
  background: transparent;
  color: #203650;
  box-shadow: none;
}

.result-actions .summary-like-button {
  width: 9.5rem;
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.summary-output-language-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-output-language-control select {
  min-height: 40px;
  border: 1px solid #cbdced;
  border-radius: 8px;
  background: #fff;
  color: #12233b;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0;
  padding: 8px 10px;
}

.summary-like-button[aria-pressed="true"] {
  border-color: #4aa37a;
  background: #ecf9f2;
  color: #17643f;
}

.summary-like-button[aria-pressed="true"]:hover {
  background: #dff4e9;
}

#detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 4px 8px;
  max-width: 100%;
  margin-top: 10px;
  color: #4d6078;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

#detail-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #6a7d92;
}

.summary-value-cue {
  max-width: 620px;
  margin: 10px 0 0;
  color: #315577;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.summary-value-cue[hidden] {
  display: none;
}

.summary-claim-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1px solid #b9daf6;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3f9ff, #eef8f5);
}

.summary-claim-card[hidden] {
  display: none;
}

.summary-claim-copy h2 {
  margin: 0 0 4px;
  color: #173a61;
  font-size: 18px;
}

.summary-claim-copy p {
  margin: 0;
  color: #4d6078;
  line-height: 1.5;
}

.summary-claim-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.summary-detail-panel {
  min-width: 0;
}

.summary-item-text-goal::before {
  content: "⚽️ ";
}

.summary-content {
  min-height: 280px;
  margin: 0;
  padding: 0;
  border: 1px solid #d6e6f5;
  border-radius: 18px;
  background: #f7fbff;
  color: #203650;
  word-break: break-word;
  line-height: 1.55;
}

.summary-content.empty {
  padding: 20px;
  color: #6a7d92;
}

.summary-section {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.summary-section + .summary-section {
  margin-top: 0;
  border-top: 1px solid #d6e6f5;
}

.summary-section h2,
.summary-section h3 {
  color: #145ac9;
  font-size: 18px;
  line-height: 1.3;
}

.summary-section ol {
  counter-reset: summary-item;
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.summary-section li {
  counter-increment: summary-item;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 5px;
  align-items: start;
  margin-inline: -20px;
  padding: 1px 20px;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.summary-section li::before {
  content: counter(summary-item) ".";
}

.summary-section li:has(.jump-button) {
  grid-template-columns: auto 28px minmax(0, 1fr) auto;
  column-gap: 6px;
}

.summary-section li.summary-item-selected {
  background: #eef6ff;
  border-top-color: #9dc9f4;
  border-bottom-color: #9dc9f4;
}

.excerpt-selection-active .summary-section li {
  cursor: pointer;
  min-height: 42px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.excerpt-selection-active .summary-section li:has(.jump-button) {
  grid-template-columns: auto 28px minmax(0, 1fr);
}

.summary-section li.summary-excerpt-selected,
.summary-section li.summary-excerpt-highlight {
  background: #e7f3ff;
  border-top-color: #2f8cff;
  border-bottom-color: #2f8cff;
}

.summary-section li.summary-excerpt-disabled {
  color: #8294a9;
  cursor: not-allowed;
  opacity: 0.62;
}

.summary-item-share-popover {
  position: absolute;
  z-index: 2;
  top: calc(100% - 4px);
  right: 16px;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.summary-item-share-prompt {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #9dc9f4;
  border-radius: 999px;
  background: #eef6ff;
  color: #145ac9;
  box-shadow: 0 10px 24px rgba(18, 35, 59, 0.18);
  font-size: 14px;
  font-weight: 900;
}

.summary-item-share-prompt .share-icon {
  width: 16px;
  height: 16px;
}

.summary-item-share-prompt:hover,
.summary-item-share-prompt:focus-visible {
  background: #dcebff;
}

.summary-item-share-menu {
  position: static;
  width: 210px;
}

.summary-item-edit-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #b8d1eb;
  border-radius: 999px;
  background: #fff;
  color: #145ac9;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.summary-item-edit-button:hover,
.summary-item-edit-button:focus-visible {
  background: #eef6ff;
}

.summary-item-edit-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.summary-item-edit-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #b8d1eb;
  border-radius: 10px;
  background: #fff;
  color: #203650;
  font: inherit;
  line-height: 1.45;
}

.summary-item-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.excerpt-action-bar {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(920px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(119, 172, 223, 0.44);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(18, 35, 59, 0.2);
  backdrop-filter: blur(8px);
}

.excerpt-action-status {
  min-width: 0;
  color: #203650;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.excerpt-action-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.jump-button {
  display: inline-grid;
  position: relative;
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin: calc((1lh - 24px) / 2) 0 0;
  padding: 0;
  place-items: center;
  vertical-align: top;
  border: 1px solid #b8d1eb;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.jump-button::after {
  content: "";
  position: absolute;
  inset: -2px -4px;
  border-radius: 999px;
}

.jump-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #145ac9;
}

.jump-button:hover {
  background: #eef6ff;
}

.summary-back-to-top {
  justify-self: center;
  width: auto;
}

.action-items h3 {
  color: #0a7a8c;
}

@media (max-width: 720px) {
  .jump-button {
    width: 24px;
    min-height: 24px;
    margin-top: calc((1lh - 24px) / 2);
  }

  .excerpt-action-bar {
    right: 8px;
    bottom: 8px;
    left: 8px;
    flex-direction: column;
    align-items: stretch;
    width: calc(100vw - 16px);
  }

  .excerpt-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-item-share-popover {
    right: 8px;
  }

  .result {
    padding: 16px;
    border-radius: 20px;
  }

  .result-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .summary-claim-card {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-claim-actions {
    flex-wrap: wrap;
  }

  .result-header-top {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .result-title-block {
    order: -1;
  }

  .result-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .result-actions > .summary-like-button {
    grid-column: 1 / -1;
  }

  .summary-more-actions > summary {
    width: 100%;
  }

  .summary-more-menu {
    right: 0;
    width: min(280px, calc(100vw - 40px));
  }

  .summary-content {
    line-height: 1.48;
  }

  .summary-content.empty {
    padding: 14px 10px;
  }

  .summary-section {
    gap: 8px;
    padding: 14px 10px;
  }

  .summary-section + .summary-section {
    margin-top: 0;
  }

  .summary-section ol {
    gap: 5px;
    padding-left: 0;
  }

  .summary-section li {
    margin-inline: -10px;
    padding: 0 10px;
  }

  #detail-meta {
    justify-content: start;
    text-align: left;
  }
}

.summary-detail-thumbnail[hidden] {
  display: none;
}

.summary-detail-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #d6e6f5;
  border-radius: 14px;
  background: #eaf5ff;
}

.summary-detail-thumbnail[hidden] {
  display: none;
}

.summary-detail-thumbnail {
  max-width: 420px;
}

:root[data-theme="dark"] .summary-section h2,
:root[data-theme="dark"] .summary-section h3 {
  color: #8fc7ff;
}

:root[data-theme="dark"] #detail-meta,
:root[data-theme="dark"] .summary-value-cue,
:root[data-theme="dark"] .summary-claim-copy p,
:root[data-theme="dark"] .summary-content.empty {
  color: #a9b9cc;
}

:root[data-theme="dark"] .summary-claim-card {
  border-color: #36536f;
  background: linear-gradient(135deg, #172b40, #18352f);
}

:root[data-theme="dark"] .summary-claim-copy h2 {
  color: #dcecff;
}

:root[data-theme="dark"] .result {
  border-color: rgba(126, 179, 232, 0.24);
  background: #162334;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .summary-content {
  color: #d9e6f5;
}

:root[data-theme="dark"] .jump-button {
  border-color: rgba(126, 179, 232, 0.36);
  background: #18283a;
  color: #8fc7ff;
  box-shadow: none;
}

:root[data-theme="dark"] .summary-output-language-control select {
  border-color: rgba(126, 179, 232, 0.36);
  background: #18283a;
  color: #edf4ff;
}

:root[data-theme="dark"] .jump-button:hover {
  background: #22364d;
}

:root[data-theme="dark"] .summary-like-button[aria-pressed="true"] {
  border-color: rgba(99, 214, 158, 0.62);
  background: #173528;
  color: #82e0b1;
}

:root[data-theme="dark"] .summary-like-button[aria-pressed="true"]:hover {
  background: #1e4534;
}

:root[data-theme="dark"] .summary-more-menu {
  border-color: rgba(126, 179, 232, 0.32);
  background: #162334;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .summary-more-menu .share-menu-button {
  color: #d9e6f5;
}

:root[data-theme="dark"] .summary-content {
  border-color: #2b4058;
  background: #101a27;
}

:root[data-theme="dark"] .summary-item-edit-button {
  border-color: #35506b;
  background: #0f1a27;
  color: #8fc7ff;
}

:root[data-theme="dark"] .summary-item-edit-button:hover,
:root[data-theme="dark"] .summary-item-edit-button:focus-visible {
  background: #22364d;
}

:root[data-theme="dark"] .summary-item-edit-form textarea {
  border-color: #35506b;
  background: #0f1a27;
  color: #edf4ff;
}

:root[data-theme="dark"] .summary-section li.summary-item-playing {
  background: rgba(80, 157, 255, 0.11);
  border-top-color: rgba(80, 157, 255, 0.32);
  border-bottom-color: rgba(80, 157, 255, 0.32);
}

:root[data-theme="dark"] .summary-section + .summary-section {
  border-top-color: #2b4058;
}

:root[data-theme="dark"] .summary-section li.summary-item-selected {
  background: #1d3854;
  border-top-color: #4e9bea;
  border-bottom-color: #4e9bea;
}

:root[data-theme="dark"] .summary-section li.summary-excerpt-selected,
:root[data-theme="dark"] .summary-section li.summary-excerpt-highlight {
  background: #1d3854;
  border-top-color: #8fc7ff;
  border-bottom-color: #8fc7ff;
}

:root[data-theme="dark"] .summary-section li.summary-excerpt-disabled {
  color: #74889d;
}

:root[data-theme="dark"] .summary-item-share-prompt {
  border-color: rgba(143, 199, 255, 0.58);
  background: #24466d;
  color: #8fc7ff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .summary-item-share-prompt:hover,
:root[data-theme="dark"] .summary-item-share-prompt:focus-visible {
  background: #2d5b8f;
}

:root[data-theme="dark"] .excerpt-action-bar {
  border-color: rgba(126, 179, 232, 0.32);
  background: rgba(22, 35, 52, 0.97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .excerpt-action-status {
  color: #d9e6f5;
}

:root[data-theme="dark"] .jump-button::before {
  border-left-color: #8fc7ff;
}

:root[data-theme="dark"] .action-items h3 {
  color: #72d4d7;
}

:root[data-theme="dark"] #detail-meta span + span::before {
  color: #7f91a6;
}
