details.tw-chain {
  background: #fff5f8;
  border: 1.5px solid #f8c8d8;
  border-radius: 14px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(244, 143, 177, 0.10);
  transition: all 0.25s ease;
}

details.tw-chain:hover {
  border-color: #f48fb1;
  box-shadow: 0 4px 16px rgba(244, 143, 177, 0.18);
}

details.tw-chain > summary {
  font-size: 14px;
  font-weight: 600;
  color: #ad5a7a;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

details.tw-chain > summary::-webkit-details-marker {
  display: none;
}

details.tw-chain > summary::before {
  content: "🪞";
  font-size: 16px;
  margin-right: 4px;
}

details.tw-chain[open] > summary::before {
  content: "🔮";
}

details.tw-chain div.chain-block {
  font-size: 13px;
  line-height: 1.6;
  color: #6b4b5a;
  padding: 6px 10px;
  margin: 4px 0;
  background: rgba(255, 230, 240, 0.5);
  border-radius: 8px;
  border-left: 3px solid #f8b0c8;
}

details.tw-chain div.chain-block b {
  color: #c85a7a;
  font-weight: 700;
}

details.tw-chain div.chain-block.b1 { border-left-color: #f48fb1; }
details.tw-chain div.chain-block.b2 { border-left-color: #f06292; }
details.tw-chain div.chain-block.b3 { border-left-color: #ec407a; }
details.tw-chain div.chain-block.b4 { border-left-color: #d81b60; }

text {
  display: block;
  background: linear-gradient(145deg, #fef7fa, #fdf0f5);
  border: 1.5px solid #f5c8d8;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px rgba(244, 143, 177, 0.08);
  line-height: 1.75;
  font-size: 15px;
  color: #3d2a34;
  transition: box-shadow 0.3s ease;
}

text:hover {
  box-shadow: 0 6px 20px rgba(244, 143, 177, 0.15);
}

text p {
  margin: 0 0 12px 0;
  text-indent: 2em;
}

text p:last-child {
  margin-bottom: 0;
}

details[open] {
  background: #fff7fa;
  border: 1.5px solid #f0c4d4;
  border-radius: 14px;
  padding: 8px 14px 14px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(244, 143, 177, 0.06);
  transition: all 0.2s ease;
}

details[open]:hover {
  border-color: #e8a0b8;
  box-shadow: 0 3px 12px rgba(244, 143, 177, 0.12);
}

details > summary {
  font-size: 14px;
  font-weight: 700;
  color: #8f4a6a;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  letter-spacing: 0.3px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

details > summary::after {
  content: " ▾";
  font-size: 12px;
  color: #e8a0b8;
  transition: transform 0.25s ease;
}

details[open] > summary::after {
  content: " ▴";
}

details[open] p {
  font-size: 13px;
  line-height: 1.65;
  color: #4a3540;
  margin: 5px 0;
  padding: 3px 6px;
  background: rgba(255, 240, 245, 0.4);
  border-radius: 6px;
}

details[open] p b,
details[open] p strong {
  color: #c85a7a;
  font-weight: 700;
}

details[open] details[open] {
  background: #fcf0f5;
  border-color: #ecc0d0;
  margin-top: 8px;
  padding: 6px 12px 10px 12px;
}

details[open] details[open] p {
  background: rgba(255, 220, 235, 0.25);
}

details[open] details[open] p:has(+ p) {
  border-bottom: 1px dashed #f0c8d8;
  padding-bottom: 6px;
}

details[open] details[open] p:last-child {
  margin-bottom: 2px;
}

a {
  color: #d47a94;
  text-decoration: none;
  border-bottom: 1px dotted #f0b8c8;
  transition: color 0.2s;
}

a:hover {
  color: #c85a7a;
  border-bottom-color: #c85a7a;
}

details[open]::-webkit-scrollbar {
  width: 5px;
}

details[open]::-webkit-scrollbar-track {
  background: #fdf0f5;
  border-radius: 10px;
}

details[open]::-webkit-scrollbar-thumb {
  background: #f0b8c8;
  border-radius: 10px;
}

details[open]::-webkit-scrollbar-thumb:hover {
  background: #e8a0b8;
}

@media (max-width: 640px) {
  text {
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  details[open] {
    padding: 6px 10px 12px 10px;
  }

  details[open] p {
    font-size: 12.5px;
    padding: 2px 4px;
  }

  details > summary {
    font-size: 13px;
  }

  details.tw-chain {
    padding: 6px 10px;
  }

  details.tw-chain div.chain-block {
    font-size: 12px;
    padding: 4px 8px;
  }
}