.class-hero {
  margin: 34px 5% 0;
  padding: 54px;
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, #fff0f7 0%, #ffffff 45%, #ffe2ef 100%);
  box-shadow: 0 24px 54px rgba(255, 0, 110, 0.14);
  border: 1px solid rgba(255,0,110,0.14);
}
.class-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.95;
  color: #8a0038;
  letter-spacing: -2px;
}
.class-hero p:last-child {
  margin: 0;
  max-width: 780px;
  font-size: clamp(22px, 2.2vw, 31px);
  line-height: 1.35;
  font-weight: 800;
  color: #c01667;
}
.back-btn,
.clear-form-btn,
.primary-submit,
.delete-post-btn {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  border-radius: 18px;
}
.back-btn {
  flex: 0 0 auto;
  padding: 17px 22px;
  color: #fff;
  background: linear-gradient(135deg, #ff006e, #d90429);
  box-shadow: 0 16px 34px rgba(255, 0, 110, 0.24);
}
.class-admin-panel {
  margin: 34px 5% 0;
  padding: 34px;
  border-radius: 34px;
  background: #fff;
  border: 2px dashed rgba(255,0,110,0.24);
  box-shadow: 0 18px 44px rgba(255, 0, 110, 0.10);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.panel-heading h2 { margin: 0; color: #8a0038; font-size: clamp(28px, 3vw, 42px); }
.clear-form-btn {
  padding: 14px 18px;
  color: #8a0038;
  background: #fff0f7;
}
.post-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-form label {
  display: grid;
  gap: 9px;
  color: #8a0038;
  font-size: 18px;
  font-weight: 900;
}
.post-form label:nth-child(2) { grid-row: span 2; }
.post-form input,
.post-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px;
  border: 1px solid rgba(255,0,110,0.24);
  border-radius: 16px;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  background: #fff9fc;
}
.post-form textarea { resize: vertical; min-height: 154px; }
.post-form small { color: #9a5473; font-size: 13px; }
.primary-submit {
  min-height: 58px;
  color: #fff;
  background: linear-gradient(135deg, #ff006e, #d90429);
  font-size: 18px;
  box-shadow: 0 16px 34px rgba(255, 0, 110, 0.24);
}
.form-message { margin: 0; align-self: center; color: #c01667; font-weight: 900; }
.class-post-section { padding-top: 52px; }
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.post-card {
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(255, 0, 110, 0.12);
  border: 1px solid rgba(255,0,110,0.14);
}
.post-card img {
  width: 100%;
  height: 260px;
  display: block;
  object-fit: cover;
  background: #fff0f7;
}
.post-body { padding: 24px; }
.post-body h3 {
  margin: 0 0 12px;
  color: #8a0038;
  font-size: 28px;
  line-height: 1.1;
}
.post-date { color: #c01667; font-size: 14px; font-weight: 900; margin-bottom: 12px; }
.post-text { color: #5f2940; font-size: 18px; line-height: 1.65; white-space: pre-wrap; }
.delete-post-btn {
  margin-top: 18px;
  padding: 12px 16px;
  color: #d90429;
  background: #fff0f7;
}
.empty-state {
  max-width: 620px;
  margin: 0 auto;
  padding: 42px 28px;
  text-align: center;
  border-radius: 28px;
  background: #fff0f7;
  color: #8a0038;
}
.empty-state h3 { margin: 0 0 10px; font-size: 34px; }
.empty-state p { margin: 0; font-size: 18px; font-weight: 800; color: #c01667; }
.class-card {
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
}
.class-card:hover { transform: translateY(-8px); box-shadow: 0 26px 54px rgba(255, 0, 110, 0.18); }
.class-card .view-class { margin-top: 20px; padding: 12px 16px; border-radius: 999px; background: #ff006e; color: #fff; font-size: 18px; font-weight: 900; }
@media (max-width: 780px) {
  .class-hero { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  .post-form { grid-template-columns: 1fr; }
  .panel-heading { flex-direction: column; align-items: flex-start; }
  .post-card img { height: 230px; }
}
.teacher-limit-notice {
  margin: 24px 5% 0;
  padding: 18px 22px;
  border-radius: 22px;
  background: #fff0f7;
  border: 1px solid rgba(255,0,110,0.2);
  color: #8a0038;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(255, 0, 110, 0.10);
}
