:root {
  --ink: #202725;
  --deep: #294543;
  --deep-2: #1f3835;
  --muted: #66746d;
  --paper: #fffdf7;
  --wash: #edf6f4;
  --line: #c7d2cd;
  --gold: #c5a64b;
  --gold-soft: #efe4bd;
  --green-soft: #dbe9e2;
  --shadow: 0 22px 70px rgba(32, 48, 44, 0.14);
  --soft-shadow: 0 10px 30px rgba(32, 48, 44, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 28%, rgba(197, 166, 75, 0.25), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(219, 233, 226, 0.95), transparent 28rem),
    linear-gradient(135deg, #eef7f6 0%, #f6f2e9 48%, #dbe8e1 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0 80px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 64px;
}

.brand {
  display: grid;
  grid-template-columns: 92px auto;
  gap: 22px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.logo-box {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  color: var(--deep);
  font-size: 42px;
  font-weight: 900;
}

.brand-logo {
  border: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.nav-pills {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 9px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.88);
  box-shadow: var(--soft-shadow);
}

.nav-pill,
.nav-link,
.identity,
.primary-button,
.soft-button,
.icon-button {
  border: 0;
  border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--deep);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  color: var(--deep);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex: none;
  object-fit: contain;
}

.nav-link.active {
  background: var(--deep);
  color: var(--paper);
}

.nav-pill.active {
  background: var(--deep);
  color: var(--paper);
}

.teacher-pill {
  background: var(--gold);
  color: var(--paper);
}

.primary-button,
.soft-button {
  padding: 12px 22px;
  font-weight: 850;
}

.primary-button {
  background: var(--deep);
  color: var(--paper);
}

.soft-button {
  background: var(--paper);
  color: var(--deep);
  box-shadow: inset 0 0 0 1px rgba(44, 72, 71, 0.15);
}

.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  text-decoration: none;
}

.nav-pill:active,
.identity:active,
.primary-button:active,
.soft-button:active,
.icon-button:active {
  transform: translateY(1px) scale(0.99);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-dashboard,
.dashboard-frame,
.pk-stage,
.poster-carousel,
.flow-card,
.speaker-box,
.vote-box,
.comment-box,
.suggestion-card,
.teacher-card {
  border-radius: 34px;
  background: rgba(255, 253, 247, 0.76);
  box-shadow: var(--shadow);
}

.overline {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 12px;
  font-size: 23px;
}

.section-note,
.flow-card p,
.speaker-box p,
.vote-box p,
.comment-box p,
.small-text {
  color: var(--muted);
  line-height: 1.75;
}

.identity-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.identity {
  padding: 11px 20px;
  background: var(--green-soft);
  color: var(--deep);
  font-weight: 850;
}

.identity.active {
  background: var(--deep);
  color: var(--paper);
}

.home-dashboard {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.course-rail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 34px;
}

.course-rail h2 {
  margin-bottom: 0;
}

.rail-nodes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
}

.rail-nodes span {
  position: relative;
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.rail-nodes span::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--line);
}

.rail-nodes .done::before,
.rail-nodes .active::before {
  background: var(--gold);
  box-shadow: none;
}

.rail-nodes .active {
  color: var(--ink);
  font-weight: 900;
}

.dashboard-frame {
  display: grid;
  grid-template-columns: 246px 1fr;
  gap: 36px;
  min-height: 660px;
  padding: 42px;
  background: rgba(255, 253, 247, 0.62);
  border-radius: 44px;
}

.left-status {
  align-self: stretch;
  padding: 34px 30px;
  border-radius: 34px;
  background: linear-gradient(145deg, var(--deep), var(--deep-2));
  color: var(--paper);
  box-shadow: var(--shadow);
}

.week-mark {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  margin: 0 auto 34px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--deep);
  text-align: center;
}

.week-mark strong {
  font-size: 24px;
}

.week-mark small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.left-status h3 {
  margin-bottom: 24px;
  color: var(--paper);
}

.status-chip {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.12);
  color: var(--paper);
  font-weight: 850;
  text-align: center;
}

.status-chip.active {
  background: var(--paper);
  color: var(--deep);
}

.status-divider {
  height: 1px;
  margin: 34px 0;
  background: rgba(255, 253, 247, 0.22);
}

.left-status p {
  color: rgba(255, 253, 247, 0.72);
}

.main-stage {
  min-width: 0;
  padding: 8px 0 0;
}

.pk-stage,
.poster-carousel,
.view:not(.active) + .view {
  margin-top: 36px;
}

.pk-stage,
.poster-carousel,
#view-signup,
#view-showcase,
#view-suggestions {
  padding: 36px;
}

.section-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-note {
  max-width: 520px;
  margin-bottom: 0;
}

.poster-row {
  display: grid;
  gap: 26px;
}

.poster-row[data-count="0"] {
  grid-template-columns: 1fr;
}

.poster-row[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
}

.poster-row[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.poster-row[data-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pk-message {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.68);
  text-align: center;
}

.pk-message strong {
  font-size: clamp(22px, 3vw, 34px);
}

.pk-message p {
  max-width: 34em;
  margin: 0;
  color: var(--muted);
}

.pk-card.unavailable {
  cursor: default;
  opacity: 0.72;
}

.pitch-status {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 850;
}

.pk-card,
.project-tile,
.work-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 30px;
  background: var(--paper);
  color: inherit;
  text-align: left;
  box-shadow: var(--soft-shadow);
  text-decoration: none;
}

.pk-card {
  min-height: 468px;
  padding: 24px;
}

.poster-art {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fffdf6, #82a891);
}

.poster-art img,
.project-tile-image,
.poster-variant img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pk-poster-image {
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.showcase-cover-image {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.poster-art.gold {
  background: linear-gradient(135deg, #fff7df, #c5a64b);
}

.poster-art.blue {
  background: linear-gradient(135deg, #f8fbf9, #a8bdc4);
}

.poster-art span {
  max-width: 8em;
  font-size: 38px;
  font-weight: 950;
}

.pk-poster-placeholder {
  align-content: center;
  gap: 14px;
  text-align: center;
}

.pk-poster-placeholder small {
  color: var(--deep);
  font-weight: 800;
}

@media (max-width: 1280px) and (min-width: 981px) {
  .poster-row[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--paper);
  font-size: 13px;
  font-weight: 850;
}

.badge.gold {
  background: var(--gold);
}

.badge.soft {
  background: var(--green-soft);
  color: var(--deep);
}

.carousel-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.project-tile {
  aspect-ratio: 1;
  padding: 22px;
  background: linear-gradient(135deg, #fffdf6, #dbe9e2);
}

.project-tile-image {
  position: absolute;
  inset: 0;
}

.project-tile.has-poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 39, 36, 0.08), rgba(20, 39, 36, 0.82));
  content: "";
}

.project-tile.has-poster .badge,
.project-tile.has-poster strong,
.project-tile.has-poster small {
  position: relative;
  z-index: 1;
}

.project-tile.has-poster strong,
.project-tile.has-poster small {
  color: var(--paper);
}

.project-tile.has-poster strong {
  margin-top: auto;
}

.project-tile strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
}

.project-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.flow-grid,
.pk-workbench,
.teacher-grid {
  display: grid;
  gap: 22px;
}

.flow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pk-workbench {
  grid-template-columns: 0.9fr 1.1fr 1fr;
}

.public-pk-workbench {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
}

.teacher-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.admin-modules,
.task-board {
  display: grid;
  gap: 22px;
  margin: 36px 0;
}

.task-board {
  padding: 32px;
  border-radius: 34px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--shadow);
}

.task-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 16px;
}

.task-icon-card {
  display: grid;
  min-height: 184px;
  place-items: center;
  gap: 7px;
  padding: 18px 10px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--deep);
  text-align: center;
}

.task-icon-card:hover {
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--soft-shadow);
}

.task-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 18px;
  background: transparent;
}

.task-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.task-icon-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.task-icon-card small,
.task-icon-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.task-icon-card em {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--deep);
}

.task-icon-card.locked {
  opacity: 0.48;
}

.task-icon-card.locked .task-icon {
  background: transparent;
  filter: grayscale(0.45);
}

.admin-module {
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: 30px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--soft-shadow);
}

.admin-module h2 {
  font-size: 27px;
}

.admin-module label {
  display: grid;
  gap: 8px;
  color: var(--deep);
  font-size: 14px;
  font-weight: 850;
}

.admin-record.compact h3 {
  margin-bottom: 0;
}

.admin-record.compact p {
  margin-bottom: 0;
}

.admin-history-layout {
  padding: 32px;
  border-radius: 34px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--shadow);
}

.submission-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.submission-index h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.submission-list {
  display: grid;
  gap: 8px;
}

.submission-link {
  display: grid;
  grid-template-columns: 145px 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

button.submission-link {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.submission-link:hover strong {
  color: var(--gold-dark);
}

.submission-detail-body {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.submission-detail-body h3 {
  font-size: 24px;
}

.submission-detail-body p {
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.submission-link time,
.submission-link span {
  color: var(--muted);
  font-size: 13px;
}

.submission-link strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.pitch-card {
  padding: 24px;
  border-top: 3px solid var(--gold);
  background: rgba(219, 233, 226, 0.56);
}

.pitch-card h3,
.speech-summary-item h3 {
  margin: 14px 0 8px;
}

.pitch-card p,
.speech-summary-item p {
  color: var(--muted);
  line-height: 1.7;
}

.pitch-card small {
  display: block;
  margin: 14px 0;
  color: var(--muted);
}

.speech-history {
  margin-top: 24px;
}

.speech-tabs {
  display: flex;
  gap: 24px;
  margin: 22px 0 12px;
  border-bottom: 1px solid var(--line);
}

.speech-tab {
  padding: 10px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.speech-tab.active {
  border-bottom-color: var(--gold);
  color: var(--deep);
}

.speech-summary-list {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.speech-summary-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.speech-summary-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.speech-summary-item time,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.task-form {
  display: none;
  gap: 16px;
}

.task-form.active {
  display: grid;
}

.task-form label {
  display: grid;
  gap: 8px;
  color: var(--deep);
  font-size: 14px;
  font-weight: 850;
}

.poster-upload-guide {
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  background: rgba(219, 233, 226, 0.58);
}

.poster-upload-guide p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.poster-variant-grid {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.4fr;
  gap: 18px;
  align-items: end;
}

.poster-variant-grid figure {
  margin: 0;
}

.poster-variant {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px dashed var(--line);
  background: rgba(255, 253, 247, 0.78);
  color: var(--muted);
  font-weight: 900;
}

.poster-variant.pk {
  aspect-ratio: 3 / 4;
}

.poster-variant.square {
  aspect-ratio: 1;
}

.poster-variant.banner {
  aspect-ratio: 5 / 2;
}

.poster-variant-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.flow-card,
.speaker-box,
.vote-box,
.comment-box,
.teacher-card {
  padding: 28px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0;
  font-weight: 850;
}

.role-preview #currentBadges {
  min-height: 52px;
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.86);
  color: var(--ink);
  outline: none;
}

input[type="text"],
input[type="url"],
input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.86);
  color: var(--ink);
  outline: none;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  padding: 15px 16px;
}

select {
  padding: 12px 14px;
}

textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="date"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 166, 75, 0.18);
}

.vote-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-weight: 850;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.timeline-list,
.comment-list,
.admin-log {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.log-item,
.comment-item,
.timeline-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(219, 233, 226, 0.62);
}

.comment-item p,
.log-item p,
.timeline-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.masonry {
  column-count: 3;
  column-gap: 20px;
}

.work-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  padding: 22px;
}

.work-thumb {
  height: 180px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7df, #9eb6ae);
}

.work-card:nth-child(2n) .work-thumb {
  height: 260px;
  background: linear-gradient(135deg, #edf6f4, #c5a64b);
}

.showcase-public-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 18px; }
.showcase-public-tools label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.showcase-public-tools input,.showcase-public-tools select { min-height: 44px; padding: 0 12px; border: 1px solid rgba(44,72,71,.2); border-radius: 10px; background: white; color: var(--deep); font: inherit; }
.showcase-public-tools .soft-button { min-height: 44px; }
.showcase-word-cover { display: grid; place-items: end start; padding: 22px; color: var(--deep); font: 900 clamp(22px,3vw,34px)/1.15 "Microsoft YaHei",sans-serif; }
.showcase-public-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.showcase-public-actions .soft-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 13px; text-decoration: none; }

.suggestion-card {
  max-width: none;
  padding: 32px;
}

.suggestion-card label {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--deep);
  font-weight: 900;
}

.captcha-state { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.suggestion-card .primary-button:disabled { cursor: not-allowed; opacity: .58; }
#suggestionCaptchaWidget { min-height: 2px; margin-bottom: 10px; }

.form-result {
  margin: 14px 0 0;
  color: var(--deep);
  font-weight: 850;
}

.role-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(44, 72, 71, 0.12);
}

.role-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.8);
  font-size: 13px;
  font-weight: 800;
}

dialog {
  width: min(980px, calc(100% - 32px));
  border: 0;
  border-radius: 34px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(21, 31, 29, 0.35);
  backdrop-filter: blur(5px);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 34px 20px;
}

.dialog-body {
  padding: 0 34px 34px;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--deep);
  color: var(--paper);
  font-size: 28px;
  line-height: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--green-soft);
}

.detail-card.full {
  grid-column: 1 / -1;
}

.group-shell {
  width: min(1120px, calc(100% - 40px));
}

.group-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  min-height: 340px;
  margin-bottom: -48px;
  padding: 72px 64px 96px;
  border-radius: 44px;
  background:
    linear-gradient(rgba(31, 56, 53, 0.42), rgba(31, 56, 53, 0.42)),
    linear-gradient(135deg, #dbe9e2, #fffdf7 48%, #8fa79e);
  box-shadow: var(--shadow);
  background-position: center;
  background-size: cover;
}

.group-hero h1 {
  margin: 0 0 18px;
  color: var(--paper);
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.06;
}

.group-hero p:not(.overline) {
  max-width: 720px;
  color: rgba(255, 253, 247, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.group-side {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--deep);
  box-shadow: var(--soft-shadow);
}

.group-side p {
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 900;
}

.group-side strong {
  line-height: 1.7;
}

.semester-report-entry {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.report-entry-icon {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
}

.semester-report-entry:active {
  transform: translateY(1px) scale(0.99);
}

.group-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
  padding: 42px;
  border-radius: 44px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.record-form,
.history-panel {
  border-radius: 30px;
}

.record-form {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
  padding: 28px;
  background: linear-gradient(145deg, var(--deep), var(--deep-2));
  color: var(--paper);
}

.record-form h2 {
  color: var(--paper);
}

.record-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 253, 247, 0.86);
  font-size: 14px;
  font-weight: 850;
}

.record-form input[type="file"] {
  max-width: 100%;
  color: rgba(255, 253, 247, 0.86);
}

.image-preview {
  display: grid;
  min-height: 118px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255, 253, 247, 0.42);
  border-radius: 20px;
  color: rgba(255, 253, 247, 0.7);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-panel {
  min-width: 0;
  padding: 18px 20px 38px;
}

.vertical-timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 18px 0 20px;
}

.vertical-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--deep);
  opacity: 0.86;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: start;
  min-height: 130px;
}

.timeline-entry::before {
  content: "";
  grid-column: 2;
  justify-self: center;
  width: 14px;
  height: 14px;
  margin-top: 20px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--deep);
  z-index: 1;
}

.timeline-entry time {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  min-width: 92px;
  margin-top: 52px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--paper);
  font-weight: 900;
  text-align: center;
  z-index: 1;
}

.timeline-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(219, 233, 226, 0.6);
  box-shadow: var(--soft-shadow);
}

.timeline-entry.left .timeline-card {
  grid-column: 1;
  text-align: right;
}

.timeline-entry.right .timeline-card {
  grid-column: 3;
}

.timeline-card h3 {
  margin: 14px 0 12px;
  font-size: 22px;
  line-height: 1.45;
}

.timeline-card p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.timeline-card a {
  color: var(--deep);
  font-weight: 900;
}

.record-shot {
  width: min(100%, 360px);
  margin-top: 14px;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.timeline-entry.right .timeline-actions {
  justify-content: flex-start;
}

.eval-button {
  padding: 9px 16px;
}

.record-comments {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.record-comment {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.78);
  text-align: left;
}

.record-comment p {
  margin: 8px 0 0;
  color: var(--muted);
}

.comment-identity {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--green-soft);
}

.comment-identity span {
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 28px, 760px);
    padding-top: 28px;
  }

  .topbar,
  .course-rail,
  .dashboard-frame,
  .group-hero,
  .group-layout,
  .admin-modules,
  .flow-grid,
  .pk-workbench,
  .teacher-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .main-stage {
    order: 1;
  }

  .left-status {
    order: 2;
  }

  .brand {
    grid-template-columns: 66px auto;
  }

  .logo-box {
    width: 66px;
    height: 66px;
    border-radius: 14px;
    font-size: 30px;
  }

  .brand strong {
    font-size: 34px;
  }

  .brand small {
    font-size: 15px;
  }

  .nav-pills {
    justify-self: start;
    flex-wrap: wrap;
    width: 100%;
  }

  .dashboard-frame,
  .group-layout,
  .task-board,
  .admin-history-layout,
  .pk-stage,
  .poster-carousel,
  #view-signup,
  #view-showcase,
  #view-suggestions {
    padding: 22px;
    border-radius: 24px;
  }

  .course-rail {
    gap: 18px;
    margin-bottom: 22px;
  }

  .rail-nodes {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .dashboard-frame {
    gap: 20px;
    min-height: 0;
  }

  .left-status {
    padding: 22px;
    border-radius: 24px;
  }

  .week-mark {
    width: 82px;
    height: 82px;
    margin: 0 0 20px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .poster-row,
  .poster-row[data-count="2"],
  .poster-row[data-count="3"],
  .poster-row[data-count="4"] {
    grid-template-columns: 1fr;
  }

  .pk-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    min-height: auto;
  }

  .poster-art {
    min-height: 88px;
    margin: 0;
    border-radius: 18px;
  }

  .poster-art span {
    font-size: 20px;
  }

  .carousel-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .masonry {
    column-count: 1;
  }

  .public-pk-workbench {
    grid-template-columns: 1fr;
  }

  .task-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submission-index,
  .pitch-grid {
    grid-template-columns: 1fr;
  }

  .submission-link {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .task-icon-card {
    min-height: 156px;
  }

  .group-shell {
    width: min(1120px, calc(100% - 40px));
  }

  .group-hero {
    min-height: 0;
    margin-bottom: -28px;
    padding: 34px 24px 64px;
    border-radius: 28px;
  }

  .group-hero h1 {
    font-size: 38px;
  }

  .record-form {
    position: static;
  }

  .vertical-timeline::before {
    left: 18px;
  }

  .timeline-entry {
    grid-template-columns: 42px 1fr;
    min-height: 0;
  }

  .timeline-entry::before {
    grid-column: 1;
    margin-top: 18px;
  }

  .timeline-entry time {
    grid-column: 2;
    justify-self: start;
    margin: 0 0 12px;
  }

  .timeline-entry.left .timeline-card,
  .timeline-entry.right .timeline-card {
    grid-column: 2;
    text-align: left;
  }

  .timeline-actions,
  .timeline-entry.right .timeline-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .group-shell {
    width: min(1120px, calc(100% - 40px));
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .topbar .nav-pills {
    position: fixed;
    z-index: 40;
    justify-self: stretch;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 2px;
    width: auto;
    padding: 6px;
    border: 1px solid rgba(27, 82, 69, 0.12);
    border-radius: 22px;
    background: rgba(255, 253, 247, 0.96);
    box-shadow: 0 14px 38px rgba(26, 63, 54, 0.2);
    backdrop-filter: blur(18px);
  }

  .topbar .nav-pill,
  .topbar .nav-link {
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 16px;
    font-size: 11px;
    line-height: 1.1;
  }

  .topbar .nav-pill.active,
  .topbar .nav-link.active {
    background: var(--green-soft);
    box-shadow: inset 0 0 0 1px rgba(27, 82, 69, 0.1);
    color: var(--deep);
  }

  .topbar .nav-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .group-shell { width: calc(100% - 32px); }
}
