/* ============================================================
   CLB VĂN HỌC — TRƯỜNG THPT NGUYỄN THÔNG (VĨNH LONG)
   school.css — Styles for School Identity & 5 New Main Modules
   ============================================================ */

/* ---------- 1. School Brand & Logo ---------- */
.brand-badge {
  overflow: hidden;
  position: relative;
  background: #ffffff !important;
}

.brand-badge img.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  display: block;
}

.topbar-crest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-crest img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
}

/* Sub-branding */
.school-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(176, 137, 60, 0.12);
  border: 1px solid var(--gold);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--oxblood);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

/* ---------- 2. Navigation Styling for 6-7 items ---------- */
@media (min-width: 1024px) {
  .nav {
    gap: 18px;
  }
  .nav a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}

/* ---------- 3. General Module Cards & Tabs ---------- */
.sub-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 30px 0 45px;
}

.tab-btn {
  padding: 10px 24px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--brown-deep);
  color: var(--paper);
  border-color: var(--brown-deep);
  box-shadow: 0 4px 14px rgba(43, 32, 19, 0.25);
}

.tab-btn.grade-btn.active {
  background: var(--oxblood);
  border-color: var(--oxblood);
}

.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 4. Study Module (Góc Học Tập) ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 50px;
}

.skill-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.skill-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.skill-box .badge-level {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gold-pale);
  color: var(--brown-deep);
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.skill-box h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  margin-bottom: 10px;
  color: var(--brown-deep);
}

.skill-box p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.skill-box ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.skill-box ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.skill-box ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.method-banner {
  background: linear-gradient(135deg, rgba(113, 48, 39, 0.08), rgba(176, 137, 60, 0.12));
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 30px;
  margin: 40px 0;
}

.essay-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 4px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s;
}

.essay-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.essay-score {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--oxblood);
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ---------- 5. Contest & Submissions (Cuộc Thi) ---------- */
.contest-hero {
  background: radial-gradient(circle at 50% 30%, rgba(244, 237, 218, 0.4), transparent), var(--card);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 50px;
  position: relative;
  text-align: center;
}

.contest-hero .ribbon {
  display: inline-block;
  background: var(--oxblood);
  color: #fff;
  padding: 6px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  border-radius: 2px;
}

.contest-hero h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.contest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
  text-align: left;
}

@media (max-width: 768px) {
  .contest-grid {
    grid-template-columns: 1fr;
  }
}

.contest-form-card {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 6px;
}

.contest-form-card label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--brown-deep);
}

.contest-form-card input,
.contest-form-card select,
.contest-form-card textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--ink);
  outline: none;
}

.contest-form-card input:focus,
.contest-form-card textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(176, 137, 60, 0.2);
}

/* Results Hall of Fame */
.results-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px;
}

.prize-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.prize-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex: none;
}

.prize-first {
  background: linear-gradient(135deg, #ffd700, #daa520);
  color: #4a3822;
  box-shadow: 0 4px 10px rgba(218, 165, 32, 0.4);
}

.prize-second {
  background: linear-gradient(135deg, #e0e0e0, #a8a8a8);
  color: #333;
}

.prize-third {
  background: linear-gradient(135deg, #cd7f32, #8c4a16);
  color: #fff;
}

/* ---------- 6. Interactive Comments (Bình Luận) ---------- */
.comments-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.comments-toggle-btn {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.comments-box {
  margin-top: 16px;
  background: rgba(236, 225, 196, 0.5);
  border-radius: 4px;
  padding: 18px;
}

.comment-list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: var(--card);
  padding: 10px 14px;
  border-radius: 4px;
  border-left: 3px solid var(--gold);
  font-size: 0.9rem;
}

.comment-author {
  font-weight: 700;
  color: var(--oxblood);
  font-size: 0.82rem;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

.comment-author span.time {
  color: var(--ink-faint);
  font-weight: normal;
  font-size: 0.75rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form input,
.comment-form textarea {
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--ink);
}

.comment-submit-btn {
  align-self: flex-end;
  padding: 6px 18px;
  background: var(--brown-deep);
  color: var(--paper);
  border: none;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}

.comment-submit-btn:hover {
  background: var(--gold);
  color: var(--brown-deep);
}

/* ---------- 7. Quotes & Resources (Kho Tư Liệu) ---------- */
.search-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 35px;
  background: var(--card);
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-input-wrap {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 20px;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--ink);
  outline: none;
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.35s var(--ease);
}

.quote-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.quote-card .quote-topic-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 12px;
}

.quote-card blockquote {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 16px;
}

.quote-card .quote-source {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.copy-quote-btn {
  background: transparent;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: var(--font-serif);
  color: var(--gold);
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.copy-quote-btn:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--brown-deep);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 4px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-size: 0.88rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- 8. Books & Reviews (Đọc Sách) ---------- */
.books-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.book-review-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.35s;
}

.book-review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--gold);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #111;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-card-body {
  padding: 24px;
}

.book-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.book-card-body .author-meta {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.student-reflection-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--oxblood);
  padding: 24px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.student-reflection-box .st-name {
  font-weight: 700;
  color: var(--brown-deep);
  font-size: 0.95rem;
}

.student-reflection-box .st-class {
  font-size: 0.8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 8px;
}

/* ---------- 9. Games & Quiz (Giải Trí) ---------- */
.quiz-wrapper {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.quiz-question-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--oxblood);
  font-weight: 700;
}

.quiz-score-badge {
  background: var(--gold-pale);
  color: var(--brown-deep);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82rem;
}

.quiz-prompt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--brown-deep);
  margin-bottom: 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.quiz-opt {
  padding: 14px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 14px;
}

.quiz-opt span.opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex: none;
}

.quiz-opt:hover:not(.disabled) {
  border-color: var(--gold);
  background: var(--paper-deep);
  transform: translateX(4px);
}

.quiz-opt.correct {
  background: rgba(47, 74, 56, 0.15);
  border-color: #2f4a38;
  color: #2f4a38;
  font-weight: 700;
}

.quiz-opt.correct span.opt-letter {
  background: #2f4a38;
  color: #fff;
  border-color: #2f4a38;
}

.quiz-opt.wrong {
  background: rgba(113, 48, 39, 0.15);
  border-color: #713027;
  color: #713027;
}

.quiz-opt.wrong span.opt-letter {
  background: #713027;
  color: #fff;
  border-color: #713027;
}

.quiz-opt.disabled {
  cursor: default;
}

.quiz-feedback {
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: none;
}

.quiz-feedback.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.quiz-feedback.correct-fb {
  background: rgba(47, 74, 56, 0.1);
  border-left: 4px solid #2f4a38;
  color: #2f4a38;
}

.quiz-feedback.wrong-fb {
  background: rgba(113, 48, 39, 0.1);
  border-left: 4px solid #713027;
  color: #713027;
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
}

/* Dark mode compatibility */
body.candle-mode .brand-badge {
  background: #ffffff !important;
}
body.candle-mode .skill-box,
body.candle-mode .essay-card,
body.candle-mode .contest-hero,
body.candle-mode .contest-form-card,
body.candle-mode .results-board,
body.candle-mode .quote-card,
body.candle-mode .book-review-card,
body.candle-mode .student-reflection-box,
body.candle-mode .quiz-wrapper,
body.candle-mode .search-filter-bar {
  background: #281f15;
  border-color: rgba(223, 178, 89, 0.22);
}
body.candle-mode .quiz-opt {
  background: #1f1811;
  color: #f0e6d2;
  border-color: rgba(223, 178, 89, 0.2);
}
body.candle-mode .quiz-prompt,
body.candle-mode .skill-box h3,
body.candle-mode .book-card-body h3,
body.candle-mode .student-reflection-box .st-name {
  color: #ffd47a;
}
body.candle-mode .tab-btn {
  background: #281f15;
  color: #f0e6d2;
  border-color: rgba(223, 178, 89, 0.25);
}

/* ---------- Mobile layout hardening ----------
   This file is loaded last on every page, so these rules intentionally
   normalize the older visual layers above it at phone widths. */
html,
body {
  overflow-x: clip;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 30px, 1180px);
  }

  .topbar-inner {
    min-height: 42px;
    padding-block: 6px;
  }

  .topbar-inner span:first-child {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-inner {
    height: 72px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 10px;
  }

  .brand-badge {
    width: 42px;
    height: 42px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text strong,
  .brand-text em {
    white-space: nowrap;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text em {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.54rem;
    letter-spacing: 0.2em;
  }

  .hamburger {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 50%;
  }

  .hamburger:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }

  .nav {
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 94px 26px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.96rem;
    letter-spacing: 0.12em;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 950;
    border: 0;
    background: rgba(43, 32, 19, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    padding: 58px 0 74px;
  }

  .hero-grid {
    gap: 48px;
  }

  .hero-copy,
  .hero-visual,
  .about-grid > *,
  .open-book,
  .ob-page,
  .footer-grid > *,
  .news-featured > *,
  .contact-grid > * {
    min-width: 0;
  }

  .hero-title {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
    line-height: 1.06;
  }

  .hero-sub,
  .about-copy p,
  .section-head p {
    font-size: 1rem;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .btn,
  .join .btn,
  .letter .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .hero-visual {
    padding: 0 12px 32px 0;
  }

  .float-quote {
    right: -4px;
    max-width: min(220px, 70%);
    padding: 15px 17px 14px;
  }

  .frame.gilt {
    padding: 10px;
  }

  .seal {
    width: 78px;
    height: 78px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .section-title {
    font-size: clamp(1.8rem, 8.5vw, 2.5rem);
  }

  .page-head {
    padding: 60px 0 50px;
  }

  .page-head .chapter {
    font-size: clamp(6rem, 38vw, 10rem);
  }

  .page-head .crumbs {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    line-height: 1.7;
  }

  .page-head h1 {
    padding-inline: 8px;
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.12;
  }

  .page-head p {
    font-size: 1rem;
  }

  .pl-orn .p-line,
  .divider-vic .rule {
    width: 42px;
  }

  .cards-grid,
  .works-grid,
  .values-grid,
  .tickets,
  .postcard-wall,
  .letters,
  .skills-grid,
  .quotes-grid,
  .books-showcase {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
  }

  .book {
    max-width: none;
    padding: 20px 10px 18px;
  }

  .book h3 {
    font-size: 1.05rem;
  }

  .quote-band {
    padding: 74px 0;
  }

  .quote-band .qmark {
    font-size: 5rem;
  }

  .join {
    padding: 72px 0;
  }

  .join .frame {
    padding: 44px 20px;
  }

  .open-book {
    grid-template-columns: minmax(0, 1fr);
  }

  .ob-page {
    padding: 24px 18px;
  }

  .ob-cell span {
    letter-spacing: 0.16em;
  }

  .search-filter-bar {
    align-items: stretch;
    padding: 14px;
    gap: 10px;
  }

  .search-input-wrap {
    width: 100%;
    min-width: 0;
  }

  .search-filter-bar > * {
    width: 100%;
  }

  .sub-nav-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 24px 0 32px;
    scrollbar-width: none;
  }

  .sub-nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: none;
    min-height: 44px;
    padding: 10px 16px;
  }

  .contest-hero {
    padding: 26px 18px;
  }

  .contest-hero h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .contest-form-card,
  .results-board,
  .quiz-wrapper,
  .book-card-body,
  .student-reflection-box {
    padding: 20px 16px;
  }

  .quiz-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .quiz-opt {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding: 54px 0 38px;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 0.94rem;
  }

  .brand-text em {
    letter-spacing: 0.14em;
  }

  .shelf {
    gap: 18px 10px;
  }
}
