#pg-study .v3-page-head {
  padding-top: 8px;
}

.study-original-head {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 6px 2px 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.study-original-head::before {
  content: "⚠";
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff7ed, #fff);
  color: #dc2626;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.08);
}

.study-original-head h1 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 820;
  line-height: 1.2;
}

.study-original-head p {
  grid-column: 2;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.study-bw {
  max-width: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0 auto 8px;
  padding: 0;
}

.study-bw img {
  display: block;
  width: 100%;
  aspect-ratio: 1176 / 220;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.study-bw img:nth-child(n+2) {
  display: none;
}

.shdr {
  max-width: 760px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 auto 8px;
  padding: 10px 0 8px;
  overflow: visible;
  scrollbar-width: none;
}

.shdr::-webkit-scrollbar {
  display: none;
}

.study-chip {
  flex: 0 0 auto;
  min-width: max-content;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 17px;
  color: #475569;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
  transition: all 0.16s ease;
}

.study-chip:active {
  transform: scale(0.96);
}

.study-chip-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.study-chip-count {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.study-chip.act,
.study-chip[aria-pressed="true"] {
  border-color: rgba(26, 115, 232, 0.35);
  color: #0f172a;
  background: linear-gradient(180deg, #eff6ff, #fff);
  box-shadow: 0 7px 18px rgba(26, 115, 232, 0.12);
}

.study-chip.act .study-chip-count,
.study-chip[aria-pressed="true"] .study-chip-count {
  color: #fff;
  background: #1a73e8;
}

.scd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.study-card-main {
  min-width: 0;
}

.scd:active {
  transform: scale(0.98);
}

.study-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 6px;
}

.scd .scc {
  height: 20px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 10px;
  color: #1558ba;
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.scd[data-v3-study-kind="warning"] .scc,
.scd .scc.tr {
  color: #b91c1c;
  background: #fee2e2;
}

.scd[data-v3-study-kind="guide"] .scc,
.scd .scc.tp {
  color: #137333;
  background: #e6f4ea;
}

.scd .scc.tg {
  color: #1558ba;
  background: #eaf2ff;
}

.scd .sctt {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #152033;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scd .sce {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--gray-5);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.study-card-cover {
  display: block;
  width: 88px;
  height: 66px;
  margin: 2px 0 0;
  border-radius: 8px;
  object-fit: cover;
  background: #e5e7eb;
}

.scd .scf {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--gray-4);
  font-size: 12px;
}

.scd .scf .scs {
  display: flex;
  gap: 12px;
}

.study-more {
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--gray-4);
  font-size: 13px;
  text-align: center;
}

.study-detail-mode .study-original-head,
.study-detail-mode #studyTabs,
.study-detail-mode #studyList,
.study-detail-mode #studyLM {
  display: none;
}

.study-detail {
  max-width: 760px;
  margin: 12px auto 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

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

.study-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.study-detail h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.study-detail-summary {
  margin: 8px 0 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
}

.study-detail-cover {
  display: block;
  width: 100%;
  max-height: 180px;
  margin: 10px 0 0;
  border-radius: 12px;
  object-fit: cover;
  background: #e5e7eb;
}

.study-detail-body {
  margin-top: 12px;
  color: #111827;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.study-detail-meta,
.study-comment span,
.study-comment-note {
  color: #64748b;
  font-size: 12px;
}

.study-detail-close,
.study-comment-submit {
  height: 32px;
  border: 1px solid rgba(26, 115, 232, 0.25);
  border-radius: 16px;
  padding: 0 12px;
  color: #1558ba;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.study-comments {
  margin-top: 14px;
}

.study-comments h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 15px;
}

.study-comment {
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.study-comment p,
.study-empty {
  margin: 0 0 5px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.study-comment-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.study-comment-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 10px;
  color: #111827;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
}

.study-like-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  color: #475569;
  background: #f1f5f9;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.study-like-btn:hover,
.study-like-btn.is-liked {
  color: #0f172a;
  background: #e2e8f0;
}

.study-like-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.v3-page-list article.is-hidden {
  display: none;
}

@media (max-width: 520px) {
  .shdr {
    gap: 6px;
    padding-top: 8px;
  }

  .study-bw img {
    border-radius: 12px;
  }

  .study-chip {
    height: 32px;
    gap: 5px;
    padding: 0 9px;
  }

  .study-chip-label {
    font-size: 11px;
  }

  .study-chip-count {
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    font-size: 9px;
  }

  .scd {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 10px;
  }

  .study-card-cover {
    width: 76px;
    height: 58px;
  }
}
