/* ============================================================
   CSE Rocks — Polished Header, Schedule Strip & Notice Board
   ============================================================ */
.site-header.cse-header {
  width: 100%;
  padding: 14px 18px 8px;
  background: transparent;
  box-sizing: border-box;
}

.cse-header__inner {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 11px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 52%, #eef4ff 100%);
  border: 1.5px solid #cfe0f5;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
}

.cse-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 12px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cse-header__brand:hover {
  transform: translateY(-1px) scale(1.03);
}

.cse-header__logo {
  height: 54px !important;
  max-height: 54px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

.cse-header__greeting {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e3a8a;
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid #bfdbfe;
  padding: 7px 15px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.08);
}

@media (max-width: 520px) {
  .site-header.cse-header {
    padding: 10px 14px 6px;
  }

  .cse-header__inner {
    padding: 9px 14px;
    border-radius: 18px;
    gap: 10px;
  }

  .cse-header__logo {
    height: 44px !important;
    max-height: 44px !important;
  }

  .cse-header__greeting {
    font-size: 0.76rem;
    padding: 5px 11px;
  }
}

/* ============================================================
   Today Schedule Card
   ============================================================ */
.today-strip-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.today-strip-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 58%, #172554 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.32);
  border-radius: 22px;
  padding: 16px 18px 19px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.today-strip-card::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 72%);
  pointer-events: none;
}

.today-strip-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 180, 252, 0.55);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.today-strip__main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.today-strip__left {
  min-width: 0;
  flex: 1;
}

.today-strip__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.today-strip__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.24);
  flex-shrink: 0;
}

.today-strip__dot.is-upcoming {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.24);
}

.today-strip__dot.is-off {
  background: #94a3b8;
  box-shadow: none;
}

.today-strip__status {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
}

.today-strip__sec-btn {
  border: 1px solid rgba(253, 230, 138, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fde68a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.today-strip__sec-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.today-strip__subject {
  margin: 0 0 3px 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.today-strip__teacher {
  margin: 0;
  font-size: 0.77rem;
  font-weight: 600;
  color: #94a3b8;
}

.today-strip__timer-box {
  min-width: 84px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  flex-shrink: 0;
}

.today-strip__timer-num {
  display: block;
  font-size: 1.14rem;
  font-weight: 800;
  color: #4ade80;
  line-height: 1.1;
}

.today-strip__timer-unit {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
}

.today-strip__list {
  position: relative;
  z-index: 1;
  display: none;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  flex-direction: column;
  gap: 7px;
}

.today-strip__list.is-open {
  display: flex;
}

.today-strip__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  padding: 7px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.today-strip__row.is-current {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.today-strip__progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.today-strip__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  border-radius: 0 4px 4px 0;
  transition: width 0.4s ease;
}

/* ============================================================
   Clean Wide-Area Running Notice Board (No Left Bar / Frame)
   ============================================================ */
.today-notice-bar {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border: 1.5px solid #cfe0f5;
  border-radius: 19px;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.today-notice-bar:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.today-notice-bar__top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.today-notice-bar__icon {
  height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

.today-notice-bar__icon::after {
  content: "NOTICE";
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.today-notice-bar__viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  padding: 3px 4px;
}

.today-notice-bar__track {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  padding-left: 100%;
  animation: cseRocksScroll 42s linear infinite;
}

.today-notice-bar:hover .today-notice-bar__track {
  animation-play-state: paused;
}

.today-notice-bar__hint {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes cseRocksScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.today-notice-expanded {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px dashed #cfe0f5;
  flex-direction: column;
  gap: 10px;
  cursor: default;
}

.today-notice-expanded.is-open {
  display: flex;
}

.notice-detail-card {
  background: #ffffff;
  border: 1.5px solid #dbeafe;
  border-radius: 15px;
  padding: 12px 14px;
  color: #16232f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.notice-detail-card--urgent {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fda4af;
}

.notice-detail-card__title {
  margin: 0 0 5px 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.notice-detail-card--urgent .notice-detail-card__title {
  color: #be123c;
}

.notice-detail-card__body {
  margin: 0;
  font-size: 0.81rem;
  line-height: 1.55;
  color: #334155;
}

.notice-detail-sublist {
  margin: 6px 0 0 0;
  padding-left: 16px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #334155;
}

.notice-detail-sublist li {
  margin-bottom: 4px;
}

@media (max-width: 520px) {
  .today-strip__subject {
    font-size: 0.98rem;
  }

  .today-notice-bar {
    padding: 10px 10px;
    border-radius: 16px;
  }

  .today-notice-bar__top {
    gap: 6px;
  }

  .today-notice-bar__icon {
    height: 26px;
    padding: 0 7px;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .today-notice-bar__icon::after {
    font-size: 0.54rem;
  }

  .today-notice-bar__track {
    font-size: 0.88rem;
    animation-duration: 55s;
  }

  .today-notice-bar__hint {
    font-size: 0.64rem;
    padding: 3px 8px;
  }
}

/* ============================================================
   CSE Rocks — Colorful Themed Hub Dashboard
   ============================================================ */
.hub-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

.hub-hero {
  text-align: center;
  margin: 20px auto 26px;
}

.hub-hero h2 {
  font-family: var(--font-body);
  font-size: 1.7rem;
  font-weight: 800;
  color: #16232f;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.hub-hero p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 820px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.hub-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 16px;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 14px rgba(16, 36, 56, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hub-card::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  transform: rotate(16deg);
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
  transition: transform 0.22s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 36, 56, 0.1);
}

.hub-card:hover::before {
  transform: rotate(28deg) scale(1.06);
}

.hub-card:active {
  transform: scale(0.96);
}

.hub-card__icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hub-card:hover .hub-card__icon {
  transform: scale(1.08);
}

.hub-card__info {
  position: relative;
  z-index: 1;
}

.hub-card__info h3 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: #16232f;
  margin: 0 0 3px 0;
}

.hub-card__info span {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

.card--blue {
  border-color: #dbeafe;
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
}
.card--blue::before {
  background: rgba(2, 132, 199, 0.12);
}
.card--blue .hub-card__icon {
  background: #0284c7;
  color: #ffffff;
}

.card--green {
  border-color: #dcfce7;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
.card--green::before {
  background: rgba(30, 158, 74, 0.12);
}
.card--green .hub-card__icon {
  background: #1e9e4a;
  color: #ffffff;
}

.card--yellow {
  border-color: #fef08a;
  background: linear-gradient(180deg, #ffffff 0%, #fefce8 100%);
}
.card--yellow::before {
  background: rgba(234, 179, 8, 0.14);
}
.card--yellow .hub-card__icon {
  background: #eab308;
  color: #ffffff;
}

.card--purple {
  border-color: #f3e8ff;
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}
.card--purple::before {
  background: rgba(139, 92, 246, 0.12);
}
.card--purple .hub-card__icon {
  background: #8b5cf6;
  color: #ffffff;
}

.card--cyan {
  border-color: #cffafe;
  background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
}
.card--cyan::before {
  background: rgba(6, 182, 212, 0.13);
}
.card--cyan .hub-card__icon {
  background: #06b6d4;
  color: #ffffff;
}

.card--dark {
  border-color: #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.card--dark::before {
  background: rgba(51, 65, 85, 0.1);
}
.card--dark .hub-card__icon {
  background: #334155;
  color: #ffffff;
}

.card--indigo {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
}
.card--indigo::before {
  background: rgba(79, 70, 229, 0.13);
}
.card--indigo .hub-card__icon {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
}

.card--rose {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}
.card--rose::before {
  background: rgba(225, 29, 72, 0.12);
}
.card--rose .hub-card__icon {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
}

.card--teal {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}
.card--teal::before {
  background: rgba(13, 148, 136, 0.13);
}
.card--teal .hub-card__icon {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
}

.card--amber {
  border-color: #fde68a;
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}
.card--amber::before {
  background: rgba(217, 119, 6, 0.14);
}
.card--amber .hub-card__icon {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
}

/* Cute Soft Hype Glow for Popular Cards */
.hub-card.is-cute-hot {
  animation: sdCuteSoftGlow 3s ease-in-out infinite;
}

@keyframes sdCuteSoftGlow {
  0%, 100% {
    box-shadow: 0 6px 16px rgba(16, 36, 56, 0.05);
  }
  50% {
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.14);
  }
}

@media (max-width: 480px) {
  .hub-card {
    flex-direction: column;
    text-align: center;
    padding: 16px 10px;
    gap: 10px;
  }
  .hub-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
  .hub-card__icon svg {
    width: 24px;
    height: 24px;
  }
  .hub-card__info h3 {
    font-size: 0.92rem;
  }
  .hub-card__info span {
    font-size: 0.7rem;
  }
}

.hub-back-btn {
  background: #16232f;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(22, 35, 47, 0.15);
  transition: all 0.2s ease;
}

.hub-back-btn:hover {
  background: #0284c7;
  transform: translateX(-3px);
}

.hub-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.hub-panel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #16232f;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--paper);
  padding-bottom: 12px;
}

/* ============================================================
   Layout & Panel Styles (Cover Page Maker)
   ============================================================ */
.layout {
  margin: 0 auto;
  padding: 0 0 10px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}
.layout__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.layout__side {
  position: sticky;
  top: 20px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .layout__side {
    position: static;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-sm);
}
.panel__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
}
.panel__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  background: #e6f6eb;
  padding: 3px 9px;
  border-radius: 999px;
}
.panel__head h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  margin: 0;
  flex: 1 1 auto;
}

/* ============================================================
   Form Fields
   ============================================================ */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field--wide {
  grid-column: 1 / -1;
}
.field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.2px;
}
.field input {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: all 0.2s ease;
}
.field input:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.field input:focus {
  outline: none;
  border-color: var(--blue-deep);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(92, 114, 182, 0.18);
}

.sub-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.sub-section h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub-section h3 span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-deep);
  background: #ebf3fa;
  border: 1px solid #d2e4f5;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.reset-link {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.reset-link:hover {
  background: #e2e8f0;
  color: var(--ink);
}

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

/* ============================================================
   Template Picker Grid
   ============================================================ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 14px;
}
@media (max-width: 700px) {
  .template-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.template-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  text-align: center;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s ease, filter 0.18s ease;
}
.template-card:nth-child(3n + 1) {
  --tilt: -1.4deg;
}
.template-card:nth-child(3n + 2) {
  --tilt: 0.8deg;
}
.template-card:nth-child(3n + 3) {
  --tilt: -0.5deg;
}

.template-card__frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 3px solid #fff;
  outline: 1px solid var(--line);
  aspect-ratio: 1414 / 2000;
  background: #fff;
}
.template-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none !important;
  -webkit-user-drag: none !important;
  user-select: none !important;
}
.template-card__clip {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 14px;
  background: var(--yellow);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.template-card__label {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}
.template-card:hover {
  transform: rotate(0deg) translateY(-3px);
}
.template-card:hover .template-card__frame {
  box-shadow: var(--shadow-md);
}
.template-card.is-selected {
  transform: rotate(0deg) translateY(-5px);
}
.template-card.is-selected .template-card__frame {
  outline: 3px solid var(--yellow);
  box-shadow: var(--shadow-lg);
}
.template-card.is-selected .template-card__label {
  color: var(--blue-deep);
}
.template-card__badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--green);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  z-index: 2;
}
.template-card.is-premium .template-card__frame {
  outline: 2px solid #e2136e !important;
}
.premium-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #e2136e, #9b0b4b);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* ============================================================
   Preview Panel & Download
   ============================================================ */
.preview-panel {
  display: flex;
  flex-direction: column;
}
.canvas-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: repeating-conic-gradient(#eef2f7 0% 25%, #f7f9fb 0% 50%) 0 0 /
    22px 22px;
  box-shadow: var(--shadow-sm);
}
.canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}
.canvas-wrap__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  color: var(--muted);
}
.canvas-wrap__loading[hidden] {
  display: none;
}

.download-btn {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease;
}
.download-btn:hover {
  background: #188540;
}
.download-btn:disabled {
  background: #9fb3c4;
  cursor: wait;
}
.preview-hint {
  margin: 10px 2px 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  max-width: 1180px;
  margin: 40px auto 30px;
  padding: 0 20px;
}

.site-footer__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-deep);
  background: #ebf3fa;
  border: 1px solid #d2e4f5;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

.link-divider {
  color: var(--line);
  font-size: 0.8rem;
}

.footer-divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
}

.footer-credits {
  margin: 0;
  color: var(--ink);
}

.credit-divider {
  margin: 0 8px;
  color: var(--line);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .site-footer__card {
    padding: 20px 18px;
    text-align: center;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 6px;
  }

  .link-divider {
    display: none;
  }
}

/* ============================================================
   Routine, Live Tracker & Schedule Styles
   ============================================================ */
.live-tracker-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 18px;
  padding: 18px 20px;
  color: #ffffff;
  margin-bottom: 22px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.live-tracker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  animation: pulseAnim 1.6s infinite;
}
@keyframes pulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}
.live-timer-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 4px 0 2px;
}
.live-sub-text {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}
.today-badge-chip {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.day-card.is-today {
  border: 2px solid #2563eb !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12) !important;
}
.day-card.is-today .day-header {
  background: #2563eb !important;
}
.routine-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.section-switch-group {
  display: flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 12px;
}
.sec-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  border-radius: 9px;
  cursor: pointer;
}
.sec-tab-btn.is-active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.download-routine-btn {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.day-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.day-header {
  background: #16232f;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.day-room-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}
.period-list {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.period-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}
.period-item.is-lab {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.period-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  min-width: 110px;
}
.period-info {
  flex: 1;
  text-align: right;
}
.period-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #16232f;
}
.period-teacher-name {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
  display: block;
  margin-top: 3px;
}

/* ============================================================
   Live News Portal Styles
   ============================================================ */
.news-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: "Inter", sans-serif;
}
.news-categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.news-categories-bar::-webkit-scrollbar {
  display: none;
}
.news-cat-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.news-cat-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.news-cat-btn.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 6px;
}
.news-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  text-decoration: none;
}
.news-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 12px 24px -6px rgba(2, 132, 199, 0.15);
}
.news-card__img-wrap {
  width: 100%;
  height: 160px;
  background: #f1f5f9;
  overflow: hidden;
}
.news-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-card__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.news-card__source {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
}
.news-card__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
  margin: 0;
}
.news-card__desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}
.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: #94a3b8;
}
.news-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-radius: 16px;
  border: 1.5px dashed #cbd5e1;
}

/* ============================================================
   Daily Knowledge Hub Styles
   ============================================================ */
.knowledge-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: "Inter", sans-serif;
}
.knowledge-categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.knowledge-categories-bar::-webkit-scrollbar {
  display: none;
}
.k-cat-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.k-cat-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.k-cat-btn.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.knowledge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.knowledge-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.knowledge-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.knowledge-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.knowledge-card__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.knowledge-card__body {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  margin: 0;
}
.knowledge-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.wiki-read-more-btn {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.knowledge-loading {
  text-align: center;
  padding: 50px 20px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-radius: 16px;
  border: 1.5px dashed #cbd5e1;
}