.project-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 18px;
}
.project-hero {
  position: relative;
  text-align: center;
  padding: 24px 0 26px;
}
.project-authors {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.author-bubble {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  display: inline-block;
}
.author-bubble img {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  object-fit: cover;

}
.project-coauthor-stack {
  position: absolute;
  right: -12px;
  bottom: 4px;
  display: flex;
  align-items: center;
}
.author-bubble .project-coauthor-stack img,
.project-coauthor-stack span {
  width: 34px;
  height: 34px;
  margin-left: -9px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--card2);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(49,48,42,.18);
}
.project-coauthor-stack span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.project-hero h1 {
  font-size: clamp(34px, 7vw, 80px);
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: none;             /* Отключает автоматические переносы */
  white-space: normal;       /* Разрешает переносы ТОЛЬКО по пробелам */
  max-width: 90%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.2;
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
}
.project-complete {
  position: absolute;
  right: 34px;
  bottom: -58px;
  width: 60px;
  height: 64px;
  z-index: 10;
}
.project-shell {
  background: var(--bg2);
  border-radius: 9px;
  padding: 26px;
}
.document-preview {
  max-width: 840px;
  max-height: none;
  margin: 0 auto;
  background: #fff;
  color: #111;
  border-radius: 3px;
  padding: 44px 54px;
  font-family: "Times New Roman", serif;
  box-shadow: 0 6px 28px rgba(49, 48, 42, .16);
}
.title-page {
  min-height: 520px;
  display: grid;
  align-content: center;
  text-align: center;
  border-bottom: 1px solid #111;
  margin-bottom: 30px;
}
.title-page h1 {
  font-size: 30px;
  text-transform: uppercase;
}
.doc-content h2 { margin-top: 32px; font-size: 22px; }
.doc-content p { text-align: justify; text-indent: 1.25cm; }
.project-actions-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 840px;
  margin: 18px auto 0;
}
.star-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  cursor: pointer;
}
.star-button:disabled { opacity: .45; cursor: not-allowed; }
.muted,
.date-pair { color: var(--muted); }
.date-pair { margin-left: auto; font-size: 14px; }
.copyright-notice {
  max-width: 840px;
  margin: 16px auto 0;
  color: var(--muted);
  text-align: center;
}
.presentation-section {
  margin-top: 34px;
}
.presentation-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.presentation-section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
}
.presentation-arrows {
  display: inline-flex;
  gap: 8px;
}
.presentation-arrows button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.presentation-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.presentation-slide {
  flex: 0 0 min(78vw, 620px);
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: var(--bg2);
  border: 1px solid var(--border);
  scroll-snap-align: start;
}
.presentation-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.presentation-slide iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.presentation-slide > span,
.presentation-slide-pdf > a {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,254,250,.86);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
.presentation-slide-file div {
  width: min(320px, 86%);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,254,250,.75);
}
.presentation-slide-file strong {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--muted);
}
.presentation-slide-file span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presentation-slide-file a {
  color: var(--ink);
  font-weight: 800;
}
.comments-section {
  margin-top: 34px;
}
.comments-section h2 {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
}
.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.comments-list {
  display: grid;
  gap: 16px;
}
.comment {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
}
.comment-reply {
  margin-left: 58px;
}
.comment-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card2);
}
.comment-body {
  background: rgba(217, 217, 217, .25);
  border-radius: 13px;
  padding: 13px 16px;
}
.comment-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  color: var(--muted);
}
.comment-head a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.comment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.mini-star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini-star .drawn-star {
  width: 30px;
  height: 30px;
}
.authors-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(49, 48, 42, .2);
  display: grid;
  place-items: center;
  padding: 18px;
}
.authors-modal[hidden] {
  display: none !important;
}
.authors-card {
  width: min(560px, 100%);
  background: var(--bg);
  border-radius: 12px;
  border: 2px solid var(--ink);
  padding: 24px;
  position: relative;
}
.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}
.authors-card h3 {
  margin: 0 0 18px;
  font-family: var(--font);
  letter-spacing: .12em;
}
.author-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.author-row + .author-row {
  border-top: 1px solid var(--border);
}
.author-row-avatar {
  display: block;
  width: 72px;
  height: 72px;
}
.author-row img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.author-row-info {
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.author-row-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.author-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.author-follow-btn {
  min-width: 116px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.author-follow-btn.subscribed {
  background: var(--card2);
  color: var(--ink);
  border-color: var(--border);
}


@media (max-width: 720px) {
  .project-page { padding: 16px 10px; }
  .project-hero { padding: 18px 0 38px; }
  .author-bubble img { width: 78px; height: 78px; }
  .project-coauthor-stack {
    right: -6px;
    bottom: 2px;
  }
  .author-bubble .project-coauthor-stack img,
  .project-coauthor-stack span {
    width: 22px;
    height: 22px;
    margin-left: -6px;
    border-width: 2px;
    font-size: 8px;
  }
  .project-hero h1 {
    max-width: 100%;
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .project-complete {
    right: 8px;
    bottom: -36px;
    width: 44px;
    height: 48px;
  }
  .project-shell { padding: 8px; border-radius: 8px; }
  .document-preview {
    width: 100%;
    padding: 26px 20px;
    font-size: 16px;
    line-height: 1.65;
  }
  .title-page { min-height: 320px; margin-bottom: 24px; }
  .title-page h1 {
    font-size: clamp(22px, 7vw, 30px);
    overflow-wrap: anywhere;
  }
  .doc-content h2 {
    margin-top: 24px;
    font-size: 20px;
    line-height: 1.22;
  }
  .doc-content p {
    text-align: left;
    text-indent: 0;
    margin: 0 0 14px;
  }
  .date-pair { margin-left: 0; width: 100%; }
  .presentation-section-head h2 {
    font-size: 28px;
  }
  .presentation-slide {
    flex-basis: 86vw;
  }
  .comment,
  .comment-reply { grid-template-columns: 42px 1fr; margin-left: 0; }
  .comment-avatar { width: 42px; height: 42px; }
  .authors-card { padding: 20px 16px; }
  .author-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }
  .author-row-avatar,
  .author-row img {
    width: 54px;
    height: 54px;
  }
  .author-follow-btn {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    padding: 7px 11px;
  }
}
