/* 0027 */
:root {
  --ink: #233241;
  --muted: #667789;
  --line: #dbe7ee;
  --paper: #fffaf3;
  --surface: #ffffff;
  --blue: #3677c8;
  --teal: #2c9a9a;
  --green: #71a95a;
  --coral: #ef765f;
  --yellow: #f5c65b;
  --shadow: 0 18px 45px rgba(35, 50, 65, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.95), rgba(238, 249, 247, 0.92)),
    repeating-linear-gradient(90deg, rgba(54, 119, 200, 0.05) 0 1px, transparent 1px 88px);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

main {
  position: relative;
  z-index: 2;
  min-height: 65vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.91);
  border-bottom: 1px solid rgba(219, 231, 238, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(44, 154, 154, 0.25);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav > a:not(.button),
.nav-dropdown-toggle,
.nav-user {
  padding: 9px 10px;
  color: #31485b;
  font-size: 15px;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 2px;
  color: #fff;
  background: var(--coral);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 4px;
  background: var(--ink);
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(54, 119, 200, 0.22);
}

.button-small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 14px;
}

.button-ghost {
  color: var(--blue);
  background: #eef6ff;
  border-color: #cfe3f8;
}

.button-danger {
  color: #fff;
  background: #bd4b4b;
  border-color: #bd4b4b;
}

.button-muted {
  color: var(--ink);
  background: #f2f6f7;
  border-color: var(--line);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 88px) clamp(18px, 5vw, 64px) 34px;
}

.home-hero {
  isolation: isolate;
  overflow: hidden;
  min-height: min(760px, calc(100vh - 72px));
}

.home-hero > *:not(.interactive-bg) {
  position: relative;
  z-index: 1;
}

.interactive-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
  pointer-events: none;
}

.hero-copy h1,
.page-title h1,
.narrow-panel h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 18px 0 28px;
  color: #456175;
  font-size: clamp(17px, 2vw, 21px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-actions,
.section-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(219, 231, 238, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-panel-content {
  padding: 18px;
}

.hero-panel-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.band,
.page-wrap {
  padding: 36px clamp(18px, 5vw, 64px);
}

.section-head,
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head h2,
.page-title h1 {
  margin: 0;
}

.section-head p,
.page-title p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.school-band {
  padding-top: 24px;
  padding-bottom: 24px;
  background: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(219, 231, 238, 0.68);
  border-bottom: 1px solid rgba(219, 231, 238, 0.68);
}

.profile-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-strip span,
.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  color: #40596c;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 20px;
}

.profile-panel {
  width: auto;
  margin: 0;
}

/* Campus page: social links beside the title and bounded contact details. */
.contact-page .page-title {
  align-items: center;
  flex-wrap: wrap;
}

.contact-page .campus-social-links {
  min-width: 0;
  max-width: calc(100% - 18px);
  margin-left: auto;
  margin-right: 18px;
  justify-content: flex-end;
}

.contact-page .campus-social-links a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact-page .profile-panel,
.contact-page .admin-toolbar > div,
.contact-page .summary-list {
  min-width: 0;
}

.contact-page .summary-list > div {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.contact-page .summary-list dt {
  white-space: nowrap;
}

.contact-page .summary-list dd {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .contact-page .page-title {
    align-items: stretch;
  }

  .contact-page .campus-social-links {
    margin-left: 0;
    justify-content: flex-start;
  }

  .contact-page .summary-list > div {
    gap: 8px;
  }
}

.link-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-list a {
  color: var(--blue);
  background: #eef6ff;
  border-color: #cfe3f8;
}

.setup-note {
  padding-top: 6px;
}

.category-tile {
  min-height: 118px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--tile-color, var(--teal));
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(35, 50, 65, 0.08);
}

.category-tile strong {
  display: block;
  margin-bottom: 4px;
  font-size: 19px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(35, 50, 65, 0.09);
}

.course-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f7f3, #fff1d8);
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.course-card:hover .course-thumb img {
  transform: scale(1.035);
}

.course-thumb span {
  color: var(--teal);
  font-size: 34px;
  font-weight: 800;
}

.course-thumb em {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(35, 50, 65, 0.74);
  border-radius: 99px;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.course-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.course-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.32;
}

.course-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.course-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #476276;
  font-size: 13px;
}

.course-meta span {
  padding: 4px 8px;
  background: #f2f7f4;
  border: 1px solid #dceadf;
  border-radius: 7px;
}

.course-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-actions del {
  display: block;
  color: #8a98a5;
  font-size: 13px;
}

.course-actions strong,
.price {
  color: #c35447;
  font-size: 20px;
}

.filters {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.7fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

[data-course-form] [data-trial-fields][hidden],
[data-course-form] [data-composition-fields][hidden],
.course-admin-layout [data-course-row][hidden],
.course-admin-layout [data-course-filter-empty][hidden] {
  display: none !important;
}

.course-admin-filter {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 18px;
}

.course-admin-filter label { display: grid; gap: 6px; font-weight: 700; }
.course-admin-filter input, .course-admin-filter select { width: 100%; min-height: 44px; }
.course-admin-filter-count { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 12px; }
.course-admin-filter-count button { padding: 6px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; box-shadow: none; }
.course-admin-filter-count button[aria-pressed="true"] { color: #a60083; border-bottom-color: #a60083; font-weight: 700; }
.course-admin-filter-count button:focus-visible { outline: 2px solid #a60083; outline-offset: 3px; }
.course-tree-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.course-tree-toolbar .course-admin-filter-count { margin: 0; }
.course-tree-tools { display: flex; gap: 8px; }
.course-admin-table .course-tree-title { display: flex; align-items: flex-start; gap: 6px; padding-inline-start: calc(var(--course-depth, 0) * 16px); }
.course-tree-label { min-width: 0; }
.course-admin-table .course-tree-toggle { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid #e7d7e1; border-radius: 7px; background: #fff; color: #a60083; cursor: pointer; line-height: 1; }
.course-tree-toggle span { display: block; font-size: 24px; transition: transform .15s ease; }
.course-tree-toggle[aria-expanded="true"] span { transform: rotate(90deg); }
.course-admin-table .course-tree-toggle:hover { background: #fbeef6; border-color: #b90090; }
.course-admin-table .course-tree-toggle:focus-visible { outline: 2px solid #a60083; outline-offset: 3px; }
.course-tree-leaf { display: inline-grid; place-items: center; flex: 0 0 28px; height: 28px; color: #b8a0b0; font-size: 20px; }
.course-tree-size { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 5px; background: #f7eaf3; color: #80506f; font-size: 12px; white-space: nowrap; }
.course-admin-table .course-tree-child > td { background: #fdf9fc; }
.course-admin-table .course-tree-child .course-tree-label { border-inline-start: 2px solid #ead9e5; padding-inline-start: 8px; }
.course-admin-table .course-tree-context .course-tree-label > strong { color: #766b75; }
@media (prefers-reduced-motion: reduce) { .course-tree-toggle span { transition: none; } }

@media (max-width: 1200px) {
  .course-admin-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .course-admin-filter { grid-template-columns: 1fr; }
}

.field label {
  color: #40596c;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbdbe5;
  border-radius: 8px;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  inline-size: 100%;
  max-inline-size: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field label,
.full > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.check-field.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.68;
}

.check-field.is-disabled input {
  cursor: not-allowed;
}

.featured-limit-note {
  display: block;
  margin-top: -4px;
  color: #9a4d35;
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.field-help-button {
  width: 20px;
  height: 20px;
  padding: 0;
  color: #315f90;
  background: #eef6ff;
  border: 1px solid #cfe3f8;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.field-help-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  width: min(280px, 80vw);
  padding: 10px 12px;
  color: #2d4658;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  transform: translateX(-50%);
}

.field-help.is-open .field-help-popover {
  display: block;
}

.combo-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(100% - 36px, 1120px);
  margin: 0 auto 18px;
  padding: 10px 0;
  background: rgba(248, 252, 252, 0.92);
  backdrop-filter: blur(10px);
}

.combo-nav a {
  padding: 8px 12px;
  color: #315f90;
  background: #eef6ff;
  border: 1px solid #cfe3f8;
  border-radius: 8px;
  font-weight: 800;
}

.combo-panel {
  width: min(100% - 36px, 1120px);
}

.combo-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.combo-panel-head h2 {
  margin: 8px 0 6px;
}

.combo-panel-head p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.inline-settings {
  display: grid;
  gap: 10px;
}

.inline-setting-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(130px, 160px);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f4;
}

.inline-setting-row:last-child {
  border-bottom: 0;
}

.inline-setting-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.narrow-panel,
.auth-panel,
.data-panel {
  width: min(100% - 36px, 920px);
  max-width: 100%;
  min-width: 0;
  margin: 40px auto;
  padding: clamp(20px, 4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  width: min(100% - 36px, 520px);
}

.split-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 34px;
  align-items: start;
  min-width: 0;
}

.split-detail > * {
  min-width: 0;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(35, 50, 65, 0.1);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.gallery-thumbs button {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-thumbs button.active {
  border-color: var(--teal);
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-panel h1 {
  margin: 4px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f4;
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f4;
  text-align: left;
  vertical-align: top;
}

th {
  color: #3f586b;
  background: #f7fbfc;
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

.table-wrap input,
.table-wrap select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbdbe5;
  border-radius: 8px;
}

.result-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.condition-builder {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}

.condition-head {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  margin-top: 10px;
  color: #3f586b;
  font-size: 13px;
  font-weight: 800;
}

.condition-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.condition-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}

.condition-row select,
.condition-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbdbe5;
  border-radius: 8px;
}

.discount-hints {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: #315f45;
  background: #eff8ef;
  border: 1px solid #d3e9d0;
  border-radius: 8px;
}

.discount-hints p {
  margin: 0;
  font-size: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item img,
.cart-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e9f5f2;
  border-radius: 8px;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.total-box {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.total-line span,
.total-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.total-line strong {
  text-align: right;
}

.total-line.final {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  background: #eef6ff;
  border: 1px solid #cfe3f8;
  border-radius: 99px;
  color: #315f90;
  font-size: 13px;
  font-weight: 700;
}

.flash {
  width: min(100% - 36px, 1100px);
  margin: 18px auto 0;
  padding: 12px 16px;
  background: #eef7ff;
  border: 1px solid #cfe3f8;
  border-radius: 8px;
}

.flash-error {
  background: #fff1f0;
  border-color: #ffd2cd;
}

.flash-success {
  background: #f0f9ef;
  border-color: #d4edd0;
}

.error-box {
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 12px;
  color: #74322d;
  background: #fff3f1;
  border: 1px solid #ffd2cd;
  border-radius: 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  padding: 30px clamp(18px, 5vw, 64px);
}

.admin-layout > section {
  min-width: 0;
}

.admin-nav {
  position: sticky;
  top: 86px;
  display: grid;
  align-self: start;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-nav a {
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 7px;
  color: #40596c;
  font-weight: 700;
}

.admin-nav a.active,
.admin-nav a:hover,
.admin-nav a:focus-visible {
  color: var(--blue);
  background: transparent;
  border-color: var(--blue);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(35, 50, 65, 0.08);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.image-list label {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-list img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 1120px) {
  .course-grid,
  .category-strip,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .split-detail,
  .profile-grid,
  .admin-layout,
  .cart-item,
  .filters {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .inline-setting-row {
    grid-template-columns: 1fr;
  }

  .condition-row {
    grid-template-columns: 1fr;
  }

  .condition-head {
    display: none;
  }
}

@media (max-width: 620px) {
  .admin-layout {
    padding: 20px 12px;
  }

  .admin-layout > section,
  .combo-panel,
  .combo-nav {
    width: 100%;
    max-width: 100%;
  }

  .combo-nav {
    margin-right: 0;
    margin-left: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .course-grid,
  .category-strip,
  .stat-grid,
  .image-list {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-title,
  .admin-toolbar,
  .course-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h1,
  .page-title h1,
  .narrow-panel h1 {
    font-size: 34px;
  }
}

/* Reference Site inspired theme */
:root {
  --ink: #0d3b1a;
  --muted: #5a7d5a;
  --line: #d8e7d4;
  --paper: #fff8e7;
  --surface: #ffffff;
  --blue: #2d8c3f;
  --teal: #2d8c3f;
  --green: #1b5e2a;
  --coral: #f08080;
  --yellow: #ffb347;
  --sky: #87ceeb;
  --soft-green: #e8f5e9;
  --shadow: 0 18px 45px rgba(13, 59, 26, 0.12);
  --shadow-soft: 0 8px 24px rgba(45, 140, 63, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(232, 245, 233, 0.72) 0, rgba(255, 248, 231, 0.94) 280px),
    linear-gradient(90deg, rgba(255, 179, 71, 0.08) 0 1px, transparent 1px 84px),
    var(--paper);
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

button,
.button,
input,
textarea,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
.button {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(45, 140, 63, 0.28);
  outline-offset: 3px;
}

.site-header {
  min-height: 84px;
  padding: 16px clamp(22px, 5vw, 68px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(216, 231, 212, 0.8);
  box-shadow: none;
  gap: clamp(22px, 3vw, 34px);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled,
.nav-open .site-header {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(216, 231, 212, 0.96);
  box-shadow: 0 6px 22px rgba(13, 59, 26, 0.08);
}

.brand {
  flex: 0 0 auto;
  gap: 14px;
  min-width: 260px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(45, 140, 63, 0.2);
}

.brand strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  gap: clamp(10px, 1.3vw, 20px);
  flex-wrap: nowrap;
}

.site-nav > a:not(.button),
.nav-dropdown-toggle,
.nav-user {
  position: relative;
  padding: 10px 5px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.site-nav .button-small {
  min-height: 42px;
  padding: 9px 18px;
  font-size: 15px;
  white-space: nowrap;
}

.site-nav > a:not(.button)::after,
.nav-dropdown-toggle::after {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  transition: width 0.2s ease;
}

.site-nav > a:not(.button):hover,
.nav-dropdown-toggle:hover {
  color: var(--blue);
}

.site-nav > a:not(.button):hover::after,
.nav-dropdown-toggle:hover::after {
  width: calc(100% - 8px);
}

.nav-count {
  min-width: 22px;
  height: 22px;
  background: #e74c3c;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.22);
  font-size: 12px;
}

.site-mascots {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.site-mascot {
  position: absolute;
  display: block;
  width: clamp(68px, 6.2vw, 108px);
  height: auto;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(13, 59, 26, 0.16);
  filter: saturate(1.05) drop-shadow(0 10px 22px rgba(45, 140, 63, 0.14));
  opacity: 0.66;
  object-fit: cover;
  transform-origin: center;
  will-change: transform, filter;
  animation: mascot-float 6.8s ease-in-out infinite;
}

.mascot-main {
  top: clamp(100px, 15vh, 146px);
  right: clamp(10px, 2.4vw, 42px);
  width: clamp(76px, 6.8vw, 116px);
}

.mascot-pink {
  bottom: clamp(18px, 3vh, 30px);
  left: clamp(10px, 2.2vw, 42px);
  width: clamp(66px, 5.8vw, 98px);
  animation-delay: 0.35s;
  animation-name: mascot-drift;
}

.site-mascot.is-scroll-active {
  animation: mascot-wake 0.74s ease both;
}

@keyframes friendly-pop {
  0% {
    filter: saturate(1);
    transform: translateY(0) rotate(0) scale(1);
  }

  45% {
    filter: saturate(1.16);
    transform: translateY(-7px) rotate(-0.8deg) scale(1.018);
  }

  100% {
    filter: saturate(1);
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes image-wake {
  0% {
    filter: saturate(1) brightness(1);
    transform: scale(1);
  }

  45% {
    filter: saturate(1.18) brightness(1.03);
    transform: scale(1.045);
  }

  100% {
    filter: saturate(1) brightness(1);
    transform: scale(1);
  }
}

@keyframes marker-pulse {
  0%,
  100% {
    transform: scale(1) rotate(45deg);
  }

  45% {
    transform: scale(1.18) rotate(45deg);
  }
}

@keyframes bubble-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.04);
  }
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(2deg);
  }
}

@keyframes mascot-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(2deg);
  }

  50% {
    transform: translate3d(8px, -10px, 0) rotate(-2deg);
  }
}

@keyframes mascot-mobile-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }

  35% {
    transform: translate3d(10px, -8px, 0) rotate(2deg);
  }

  70% {
    transform: translate3d(-8px, 7px, 0) rotate(-2deg);
  }
}

@keyframes mascot-mobile-drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(2deg);
  }

  40% {
    transform: translate3d(-8px, -7px, 0) rotate(-1deg);
  }

  75% {
    transform: translate3d(9px, 6px, 0) rotate(2deg);
  }
}

@keyframes mascot-wake {
  0% {
    filter: saturate(1.05) drop-shadow(0 10px 22px rgba(45, 140, 63, 0.14));
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }

  48% {
    filter: saturate(1.22) brightness(1.05) drop-shadow(0 16px 28px rgba(45, 140, 63, 0.2));
    transform: translate3d(0, -10px, 0) rotate(-4deg) scale(1.06);
  }

  100% {
    filter: saturate(1.05) drop-shadow(0 10px 22px rgba(45, 140, 63, 0.14));
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

.nav-toggle {
  position: relative;
  z-index: 55;
  width: 44px;
  height: 44px;
  border-color: transparent;
  border-radius: 50%;
  background: rgba(232, 245, 233, 0.9);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(13, 59, 26, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

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

.button,
button.button {
  min-height: 46px;
  padding: 11px 20px;
  background: var(--blue);
  border-color: var(--blue);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(45, 140, 63, 0.16);
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button:hover {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 14px 30px rgba(45, 140, 63, 0.22);
  transform: translateY(-2px);
}

.button:active {
  transform: scale(0.97);
}

.button-small {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 14px;
}

.button-ghost {
  color: var(--blue);
  background: #fff;
  border-color: var(--blue);
  box-shadow: none;
}

.button-ghost:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button-muted {
  color: var(--ink);
  background: var(--soft-green);
  border-color: var(--line);
  box-shadow: none;
}

.button-danger {
  background: #e74c3c;
  border-color: #e74c3c;
}

.button-danger:hover {
  background: #c84034;
  border-color: #c84034;
}

.motion-target {
  transform-origin: center;
  transition:
    transform 0.24s ease,
    filter 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease;
  will-change: transform;
}

.brand:hover .brand-mark,
.brand-mark.is-scroll-active,
.brand-mark.is-pointer-active {
  filter: saturate(1.18) brightness(1.04);
  transform: rotate(-4deg) scale(1.08);
}

.hero-panel:hover,
.hero-panel.is-scroll-active,
.hero-panel.is-pointer-active,
.course-card:hover,
.course-card.is-scroll-active,
.course-card.is-pointer-active,
.category-tile:hover,
.category-tile.is-scroll-active,
.category-tile.is-pointer-active,
.data-panel:hover,
.data-panel.is-scroll-active,
.data-panel.is-pointer-active,
.profile-panel:hover,
.profile-panel.is-scroll-active,
.profile-panel.is-pointer-active,
.cart-item:hover,
.cart-item.is-scroll-active,
.cart-item.is-pointer-active,
.total-box:hover,
.total-box.is-scroll-active,
.total-box.is-pointer-active,
.stat-card:hover,
.stat-card.is-scroll-active,
.stat-card.is-pointer-active,
.image-list label:hover,
.image-list label.is-scroll-active,
.image-list label.is-pointer-active {
  filter: saturate(1.08);
  box-shadow: 0 18px 46px rgba(45, 140, 63, 0.18);
  transform: translateY(-6px) rotate(-0.35deg);
}

.hero-panel.is-scroll-active,
.course-card.is-scroll-active,
.category-tile.is-scroll-active,
.data-panel.is-scroll-active,
.profile-panel.is-scroll-active,
.cart-item.is-scroll-active,
.total-box.is-scroll-active,
.stat-card.is-scroll-active,
.image-list label.is-scroll-active {
  animation: friendly-pop 0.9s ease both;
}

.motion-target:hover,
.motion-target.is-pointer-active {
  animation: none;
}

.hero-panel:hover img,
.hero-panel.is-scroll-active img,
.hero-panel.is-pointer-active img,
.course-card:hover .course-thumb img,
.course-card.is-scroll-active .course-thumb img,
.course-card.is-pointer-active .course-thumb img,
.gallery-main:hover,
.gallery-main.is-scroll-active,
.gallery-main.is-pointer-active,
.image-list label:hover img,
.image-list label.is-scroll-active img,
.image-list label.is-pointer-active img {
  filter: saturate(1.18) brightness(1.03);
}

.hero-panel.is-scroll-active img,
.course-card.is-scroll-active .course-thumb img,
.gallery-main.is-scroll-active,
.image-list label.is-scroll-active img {
  animation: image-wake 0.95s ease both;
}

.hero {
  max-width: 1240px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(42px, 7vw, 86px) clamp(16px, 5vw, 40px) clamp(72px, 8vw, 104px);
}

.home-hero {
  max-width: none;
  min-height: min(820px, calc(100svh - 72px));
  background: var(--soft-green);
}

.home-hero::after {
  position: absolute;
  right: -8%;
  bottom: -1px;
  left: -8%;
  z-index: 0;
  height: clamp(58px, 8vw, 92px);
  background: var(--paper);
  clip-path: ellipse(62% 86% at 50% 100%);
  content: "";
}

.interactive-bg {
  opacity: 0.64;
  mix-blend-mode: multiply;
}

.interactive-bg.taiwan-time-sky {
  inset: 0 auto 0 0;
  width: min(68%, 1120px);
  height: 100%;
  opacity: 0.72;
  mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 68%, rgba(0, 0, 0, 0.58) 82%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 68%, rgba(0, 0, 0, 0.58) 82%, transparent 100%);
}

.home-hero[data-time-phase="night"] .taiwan-time-sky {
  opacity: 0.66;
}

.hero-copy {
  width: 100%;
  max-width: 560px;
  min-width: 0;
}

.hero-copy h1,
.page-title h1,
.narrow-panel h1 {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.hero-copy h1 {
  max-width: min(620px, 100%);
  font-size: 60px;
}

.hero-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 14px;
  color: var(--blue);
  background: rgba(45, 140, 63, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  box-shadow: 0 22px 52px rgba(13, 59, 26, 0.16);
  transform: translateZ(0);
}

.hero-panel img {
  aspect-ratio: 4 / 3;
  transition: transform 0.35s ease;
}

.hero-panel:hover img {
  transform: scale(1.04);
}

.hero-panel-content {
  position: relative;
  z-index: 1;
  padding: 20px 22px 24px;
  background: #fff;
}

.hero-panel-content strong {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.25;
}

.hero-panel-content p {
  margin: 8px 0 0;
  color: var(--muted);
}

.band,
.page-wrap {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: clamp(42px, 6vw, 76px) clamp(16px, 5vw, 40px);
}

.school-band {
  width: 100%;
  max-width: none;
  padding-right: max(clamp(16px, 5vw, 40px), calc((100vw - 1240px) / 2 + 40px));
  padding-left: max(clamp(16px, 5vw, 40px), calc((100vw - 1240px) / 2 + 40px));
  background: #fff;
  border-color: rgba(216, 231, 212, 0.86);
}

.section-head,
.page-title {
  margin-bottom: clamp(22px, 3vw, 34px);
}

.section-head h2,
.page-title h1,
.detail-panel h1 {
  color: var(--ink);
  font-weight: 900;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.section-head p,
.page-title p {
  color: var(--muted);
}

.category-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.category-tile {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::before {
  display: block;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  background: var(--soft-green);
  background: color-mix(in srgb, var(--tile-color, var(--blue)) 18%, white);
  border-radius: 18px;
  content: "";
  transition: background 0.24s ease, transform 0.24s ease;
}

.category-tile::after {
  position: absolute;
  top: 38px;
  left: 40px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--tile-color, var(--blue));
  border-top: 0;
  border-left: 0;
  border-radius: 3px;
  content: "";
  transform: rotate(45deg);
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.category-tile:hover::before,
.category-tile.is-scroll-active::before,
.category-tile.is-pointer-active::before {
  background: var(--soft-green);
  background: color-mix(in srgb, var(--tile-color, var(--blue)) 28%, white);
  transform: rotate(-4deg) scale(1.08);
}

.category-tile:hover::after,
.category-tile.is-scroll-active::after,
.category-tile.is-pointer-active::after {
  animation: marker-pulse 0.82s ease both;
  border-color: var(--blue);
}

.category-tile:hover,
.course-card:hover,
.data-panel:hover,
.stat-card:hover {
  box-shadow: 0 16px 42px rgba(45, 140, 63, 0.16);
  transform: translateY(-4px);
}

.category-tile strong {
  color: var(--ink);
  font-size: 19px;
}

.category-tile span {
  display: block;
  color: var(--muted);
}

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

.course-card {
  border: 0;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-thumb {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(232, 245, 233, 0.95), rgba(255, 248, 231, 0.95)),
    var(--soft-green);
}

.course-thumb img {
  transition: transform 0.32s ease;
}

.course-card:hover .course-thumb img {
  transform: scale(1.055);
}

.course-thumb span {
  color: var(--blue);
}

.course-thumb em {
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  color: var(--ink);
  background: rgba(255, 179, 71, 0.94);
  border-radius: 999px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(13, 59, 26, 0.12);
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.course-card:hover .course-thumb em,
.course-card.is-scroll-active .course-thumb em,
.course-card.is-pointer-active .course-thumb em {
  color: #fff;
  background: var(--blue);
  transform: translateY(-1px);
}

.course-card-body {
  gap: 14px;
  padding: 20px;
}

.course-card h3 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.38;
}

.course-card h3 a:hover {
  color: var(--blue);
}

.course-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-meta {
  color: var(--muted);
}

.course-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  background: var(--soft-green);
  border: 0;
  border-radius: 999px;
}

.course-actions {
  align-items: center;
}

.course-actions strong,
.price {
  color: var(--blue);
  font-size: 21px;
}

.filters {
  grid-template-columns: minmax(220px, 1.1fr) minmax(160px, 0.75fr) minmax(160px, 0.75fr) auto;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(216, 231, 212, 0.92);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.field label {
  color: var(--ink);
  font-weight: 800;
}

.field input,
.field textarea,
.field select,
.table-wrap input,
.table-wrap select,
.condition-row select,
.condition-row input {
  min-height: 48px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #cfe0cc;
  border-radius: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.table-wrap input:focus,
.table-wrap select:focus,
.condition-row select:focus,
.condition-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(45, 140, 63, 0.12);
  outline: 0;
}

.field input[readonly] {
  color: #52685f;
  background: #f7fbf7;
}

.auth-link {
  display: inline-flex;
  justify-content: center;
  color: var(--blue);
  font-weight: 800;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.gotcha-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.birthdate-desktop {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.birthdate-mobile {
  display: block;
}

.student-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.student-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid #cfe0cc;
  border-radius: 16px;
  cursor: pointer;
}

.field .student-choice input[type="checkbox"] {
  width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--blue);
}

.student-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.custom-course-student-picker {
  max-height: 360px;
  overflow-y: auto;
}

.custom-course-student-picker .student-choice span {
  display: grid;
  gap: 0.18rem;
}

.custom-course-student-picker .student-choice small {
  color: var(--muted);
  font-size: 0.78rem;
}

.custom-course-student-picker .student-choice.is-disabled {
  cursor: default;
  opacity: 0.76;
}

.student-choice:has(input:checked) {
  color: var(--blue);
  background: var(--soft-green);
  border-color: var(--blue);
}

@media (min-width: 1025px) {
  .birthdate-desktop {
    display: grid;
  }

  .birthdate-mobile {
    display: none;
  }
}

.course-admin-layout .course-list-actions .button {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

.course-admin-layout .course-list-actions .button:hover {
  box-shadow: none;
  transform: none;
}

.course-list-action-cell {
  width: 300px;
  min-width: 260px;
}

.course-list-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.course-list-actions > form {
  margin: 0;
}

.course-list-actions > small {
  max-width: 300px;
  line-height: 1.4;
}

.lesson-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  min-width: 220px;
}

.lesson-list-actions form {
  margin: 0;
}

.lesson-list-actions button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.lesson-list-actions small {
  flex-basis: 100%;
  line-height: 1.4;
}

.course-list-status-cell {
  min-width: 150px;
}

.course-list-status-tags {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.course-list-status-tags .badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .course-list-action-cell {
    width: auto;
    min-width: 180px;
  }

  .course-list-actions {
    flex-wrap: wrap;
  }
}

.narrow-panel,
.auth-panel,
.data-panel,
.detail-panel,
.total-box,
.admin-nav,
.stat-card,
.table-wrap,
.result-box {
  border-color: rgba(216, 231, 212, 0.9);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.narrow-panel,
.auth-panel,
.data-panel,
.detail-panel,
.total-box,
.admin-nav,
.stat-card {
  background: #fff;
}

.data-panel,
.stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-main {
  border-radius: 30px;
  box-shadow: 0 18px 45px rgba(13, 59, 26, 0.13);
}

.gallery-thumbs {
  gap: 10px;
}

.gallery-thumbs button {
  border-radius: 18px;
}

.gallery-thumbs button.active {
  border-color: var(--blue);
}

.gallery-thumbs button:hover,
.gallery-thumbs button.is-scroll-active,
.gallery-thumbs button.is-pointer-active {
  border-color: var(--blue);
  box-shadow: 0 10px 22px rgba(45, 140, 63, 0.16);
  transform: translateY(-2px);
}

.detail-panel {
  padding: clamp(22px, 4vw, 34px);
}

.summary-list div {
  border-color: #edf6ed;
}

.summary-list dt {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
}

th {
  color: var(--ink);
  background: var(--soft-green);
}

td,
th {
  border-color: #edf6ed;
}

.profile-strip span,
.link-list a,
.badge,
.combo-nav a {
  min-height: 34px;
  color: var(--blue);
  background: var(--soft-green);
  border-color: rgba(168, 196, 168, 0.8);
  border-radius: 999px;
  font-weight: 800;
}

.profile-strip span {
  color: var(--ink);
  background: #fff;
}

.profile-strip span:hover,
.profile-strip span.is-scroll-active,
.profile-strip span.is-pointer-active,
.link-list a:hover,
.link-list a.is-scroll-active,
.link-list a.is-pointer-active,
.badge.is-scroll-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 10px 20px rgba(45, 140, 63, 0.18);
  transform: translateY(-3px);
}

.profile-grid {
  gap: 24px;
}

.cart-item {
  grid-template-columns: 112px minmax(0, 1fr) minmax(190px, 270px);
  gap: 18px;
  border: 0;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.cart-item img,
.cart-placeholder {
  border-radius: 20px;
}

.cart-item h2 {
  margin: 8px 0 6px;
  line-height: 1.28;
}

.total-box {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

.total-line.final {
  color: var(--ink);
  border-color: var(--line);
}

.discount-hints {
  color: #1b5e2a;
  background: var(--soft-green);
  border-color: #cfe0cc;
  border-radius: 18px;
}

.flash {
  margin-top: 16px;
  background: var(--soft-green);
  border-color: #cfe0cc;
  border-radius: 18px;
}

.flash-error {
  background: #fff2ef;
  border-color: #ffd6ce;
}

.flash-success {
  background: #ecf9ed;
  border-color: #cce9cf;
}

.error-box {
  border-radius: 18px;
}

.admin-layout {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.admin-nav {
  top: 92px;
  padding: 12px;
}

.admin-nav a {
  border-radius: 16px;
  color: var(--muted);
}

.admin-nav a.active,
.admin-nav a:hover,
.admin-nav a:focus-visible {
  background: transparent;
  border-color: var(--blue);
  color: var(--green);
}

.stat-card strong {
  color: var(--ink);
}

.admin-toolbar {
  align-items: center;
}

.image-list label {
  border-color: var(--line);
  border-radius: 20px;
}

.image-list img {
  border-radius: 16px;
}

.condition-head,
.inline-setting-row {
  border-color: #edf6ed;
}

.field-help-button {
  color: var(--blue);
  background: var(--soft-green);
  border-color: #cfe0cc;
}

.field-help-popover {
  border-color: var(--line);
  border-radius: 18px;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: clamp(36px, 6vw, 58px) clamp(18px, 5vw, 64px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
  border-top: 0;
}

.site-footer strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-links a:hover {
  color: #fff;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0 6px, transparent 7px),
    linear-gradient(135deg, var(--blue), var(--green));
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(45, 140, 63, 0.26);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.back-to-top-arrow {
  position: relative;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: translateY(4px) rotate(45deg);
}

.back-to-top:hover {
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0 6px, transparent 7px),
    linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 18px 34px rgba(45, 140, 63, 0.32);
  transform: translateY(-3px) scale(1.04);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: bubble-float 3.4s ease-in-out infinite;
}

.back-to-top.is-visible:hover,
.back-to-top.is-visible.is-pressed {
  animation: none;
}

.back-to-top.is-visible:hover {
  transform: translateY(-3px) scale(1.04);
}

.back-to-top.is-pressed {
  transform: translateY(0) scale(0.92);
}

.back-to-top.is-visible.is-pressed {
  transform: translateY(0) scale(0.92);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1120px) {
  .site-header {
    padding-right: 24px;
    padding-left: 24px;
    gap: 18px;
  }

  .brand {
    min-width: 232px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav > a:not(.button),
  .nav-user {
    font-size: 15px;
  }

  .site-nav .button-small {
    padding-right: 15px;
    padding-left: 15px;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-strip,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: center;
    min-height: 72px;
    padding: 12px 16px;
  }

  .brand {
    gap: 11px;
    min-width: 0;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    font-size: 11px;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 45;
    display: flex;
    width: min(88vw, 420px);
    height: 100dvh;
    padding: 96px 28px 28px;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: nowrap;
    overflow-y: auto;
    background: #fff;
    border: 0;
    border-left: 4px solid var(--blue);
    border-radius: 0;
    box-shadow: -18px 0 42px rgba(13, 59, 26, 0.18);
    transform: translate3d(104%, 0, 0);
    transition: transform 0.28s ease;
    contain: layout paint;
  }

  .site-nav.is-open {
    display: flex;
    transform: translate3d(0, 0, 0);
  }

  .site-nav > a:not(.button),
  .site-nav .button,
  .nav-user {
    width: 100%;
  }

  .site-nav > a:not(.button),
  .nav-user {
    padding: 12px 0;
    color: var(--ink);
    font-size: 20px;
  }

  .site-nav > a:not(.button)::after {
    display: none;
  }

  .site-nav .button {
    min-height: 50px;
  }

  .site-mascot {
    opacity: 0.64;
  }

  .mascot-main {
    top: 88px;
    right: 12px;
    width: 82px;
  }

  .mascot-pink {
    bottom: 86px;
    left: 12px;
    width: 74px;
  }

  .hero,
  .split-detail,
  .profile-grid,
  .cart-item,
  .filters {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .hero-copy p {
    margin-right: auto;
    margin-left: auto;
    font-size: 17px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-actions,
  .section-actions,
  .form-actions {
    justify-content: center;
  }

  .total-box {
    position: static;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .band,
  .page-wrap {
    padding: 38px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field input,
  .field textarea,
  .field select,
  .table-wrap input,
  .table-wrap select,
  .button {
    width: 100%;
    max-width: 100%;
  }

  .course-grid,
  .category-strip,
  .stat-grid,
  .image-list {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-title,
  .admin-toolbar,
  .course-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head .button,
  .page-title .button,
  .section-actions .button,
  .hero-actions .button,
  .course-actions form,
  .course-actions form .button {
    width: 100%;
  }

  .hero-copy h1,
  .page-title h1,
  .narrow-panel h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  .hero-panel {
    border-radius: 26px;
  }

  .checkout-table {
    overflow: visible;
  }

  .checkout-table table {
    min-width: 0;
  }

  .checkout-table thead {
    display: none;
  }

  .checkout-table tbody,
  .checkout-table tr,
  .checkout-table td {
    display: block;
    width: 100%;
  }

  .checkout-table tr {
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #edf6ed;
  }

  .checkout-table tr:last-child {
    border-bottom: 0;
  }

  .checkout-table td {
    display: grid;
    grid-template-columns: minmax(62px, max-content) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .checkout-table td::before {
    color: var(--muted);
    font-weight: 800;
    content: attr(data-label);
  }

  .cart-item {
    padding: 16px;
  }

  .cart-item img,
  .cart-placeholder {
    width: 92px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  .back-to-top-arrow {
    width: 11px;
    height: 11px;
  }
}

@media (max-width: 460px) {
  .brand strong {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    width: 100vw;
  }

  .site-mascot {
    opacity: 0.62;
  }

  .mascot-main {
    top: 84px;
    right: 10px;
    width: 64px;
  }

  .mascot-pink {
    bottom: 72px;
    left: 6px;
    width: 56px;
  }

  .hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .filters,
  .narrow-panel,
  .auth-panel,
  .data-panel,
  .detail-panel,
  .total-box {
    border-radius: 22px;
  }

  .admin-nav {
    grid-template-columns: 1fr;
  }
}

.field-note {
  color: var(--muted);
  font-size: 13px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.checkbox-grid.compact {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
}

.checkbox-grid label {
  display: inline-flex;
  gap: 8px;
  align-items: flex-start;
  color: #40596c;
  font-weight: 700;
}

.course-assignment-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.course-assignment-grid small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 500;
}

.campus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mini-permissions-form,
.refund-form {
  display: grid;
  gap: 8px;
}

.print-sheet {
  width: min(100%, 900px);
  margin: 0 auto 32px;
  padding: clamp(22px, 4vw, 42px);
  color: #223246;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.document-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 22px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 2px solid #223246;
}

.document-head h1 {
  margin: 0 0 8px;
  font-size: 42px;
  letter-spacing: 0;
}

.document-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.document-head dl,
.document-meta {
  display: grid;
  gap: 8px;
}

.document-head dl {
  margin: 0;
}

.document-head dl div,
.document-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.document-head dt,
.document-meta span {
  color: var(--muted);
}

.document-head dd,
.document-meta strong {
  margin: 0;
  text-align: right;
}

.document-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0;
  padding: 14px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.document-table {
  min-width: 0;
  margin-top: 18px;
}

.document-total {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid #223246;
  font-size: 24px;
  font-weight: 800;
}

.document-note {
  color: var(--muted);
  text-align: right;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) minmax(90px, auto) minmax(120px, 1fr) minmax(90px, auto);
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 16px;
  overflow: hidden;
  background: #eef3f6;
  border-radius: 999px;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-income {
  background: var(--teal);
}

.bar-expense {
  background: var(--coral);
}

.is-hidden {
  display: none !important;
}

.paper-receipt {
  position: relative;
  max-width: 840px;
  padding: 34px 46px 28px;
  color: #252525;
  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.025) 0 2px, transparent 2px 5px);
  border: 1px solid #363636;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.receipt-no {
  position: absolute;
  top: 18px;
  right: 46px;
  color: #252525;
  font-size: 26px;
  letter-spacing: 1px;
}

.receipt-no strong {
  color: #bd4b4b;
  font-weight: 700;
}

.receipt-letterhead {
  margin-bottom: 34px;
  text-align: center;
}

.receipt-contact {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  color: #3a3a3a;
  font-size: 15px;
  font-weight: 700;
}

.receipt-brand-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.receipt-brand-row img {
  width: 96px;
  height: 70px;
  object-fit: contain;
}

.receipt-brand-row h1 {
  margin: 0;
  color: #222;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 3px;
  text-align: left;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.receipt-buyer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 700;
}

.receipt-buyer-row span {
  display: inline-block;
  min-width: 260px;
  padding: 0 12px 2px;
  border-bottom: 2px solid #333;
}

.receipt-grid-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  border: 2px solid #242424;
  background: rgba(255, 255, 255, 0.35);
}

.receipt-grid-table th,
.receipt-grid-table td {
  height: 42px;
  padding: 5px 8px;
  border: 2px solid #242424;
  color: #222;
  font-size: 15px;
  vertical-align: middle;
}

.receipt-grid-table th {
  height: 40px;
  background: transparent;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.7em;
  text-align: center;
}

.receipt-grid-table th:nth-child(1),
.receipt-grid-table td:nth-child(1) {
  width: 42%;
}

.receipt-grid-table th:nth-child(2),
.receipt-grid-table td:nth-child(2) {
  width: 12%;
  text-align: center;
}

.receipt-grid-table th:nth-child(3),
.receipt-grid-table td:nth-child(3),
.receipt-grid-table th:nth-child(4),
.receipt-grid-table td:nth-child(4) {
  width: 12%;
  text-align: right;
}

.receipt-grid-table th:nth-child(5),
.receipt-grid-table td:nth-child(5) {
  width: 22%;
  font-size: 13px;
}

.receipt-grid-table tfoot td {
  height: 44px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.receipt-signature-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-top: 14px;
  border: 2px solid #242424;
}

.receipt-signature-grid div {
  min-height: 82px;
  padding: 10px 12px;
  border-right: 2px solid #242424;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.7em;
  text-align: center;
}

.receipt-signature-grid div:last-child {
  border-right: 0;
}

.receipt-notes {
  margin-top: 14px;
  padding: 10px 12px;
  border: 2px solid #242424;
  background: rgba(255, 255, 255, 0.42);
}

.receipt-notes h2 {
  margin: 0 0 5px;
  font-size: 17px;
}

.receipt-notes p {
  margin: 0;
  color: #252525;
  font-size: 11.5px;
  line-height: 1.42;
}

.receipt-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  color: #2f2f2f;
  font-size: 14px;
  font-weight: 700;
}

input[type="checkbox"],
input[type="radio"],
.field input[type="checkbox"],
.field input[type="radio"],
.table-wrap input[type="checkbox"],
.table-wrap input[type="radio"] {
  width: auto;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--blue);
}

.admin-body .site-mascots {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.admin-body) .site-mascot {
    animation: none;
    will-change: transform, filter;
  }
}

@media (hover: none), (pointer: coarse) {
  body:not(.admin-body) .site-mascot {
    animation: mascot-mobile-drift-a 8.5s ease-in-out infinite;
    will-change: transform;
  }

  body:not(.admin-body) .mascot-pink {
    animation-name: mascot-mobile-drift-b;
    animation-duration: 9.2s;
  }
}

.category-tile:hover,
.course-card:hover,
.data-panel:hover,
.profile-panel:hover,
.cart-item:hover,
.total-box:hover,
.stat-card:hover,
.profile-strip span:hover,
.link-list a:hover,
.gallery-thumbs button:hover,
.back-to-top:hover,
.back-to-top.is-visible:hover,
.back-to-top.is-pressed,
.back-to-top.is-visible.is-pressed {
  transform: none;
}

.button:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 12px 24px rgba(45, 140, 63, 0.22);
}

.button-ghost:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button-danger:hover {
  color: #fff;
  background: #a83f3f;
  border-color: #a83f3f;
}

.button-muted:hover {
  color: var(--ink);
  background: #e7eef0;
  border-color: #d4e1e4;
}

.admin-body .button:hover,
.admin-body .button:active {
  transform: none;
  box-shadow: none;
}

.admin-body .button:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.admin-body .button-ghost:hover {
  color: var(--blue);
  background: #eef6ff;
  border-color: #cfe3f8;
}

.admin-body .button-danger:hover {
  color: #fff;
  background: #bd4b4b;
  border-color: #bd4b4b;
}

.admin-body .button-muted:hover {
  color: var(--ink);
  background: #f2f6f7;
  border-color: var(--line);
}

.category-tile:hover,
.course-card:hover,
.data-panel:hover,
.stat-card:hover,
.hero-panel:hover,
.profile-panel:hover,
.cart-item:hover,
.total-box:hover {
  box-shadow: var(--shadow-soft);
}

.category-tile:hover::before,
.category-tile:hover::after,
.course-card:hover .course-thumb em,
.profile-strip span:hover,
.link-list a:hover {
  animation: none;
  transform: none;
}

.category-tile:hover::before {
  background: color-mix(in srgb, var(--tile-color, var(--blue)) 18%, white);
}

.category-tile:hover::after {
  border-color: var(--tile-color, var(--blue));
}

.course-card:hover .course-thumb em {
  color: var(--ink);
  background: rgba(255, 179, 71, 0.94);
}

.profile-strip span:hover,
.link-list a:hover {
  color: var(--blue);
  background: var(--soft-green);
  border-color: rgba(168, 196, 168, 0.8);
  box-shadow: none;
}

.profile-strip span:hover {
  color: var(--ink);
  background: #fff;
}

.hero-panel:hover img,
.course-card:hover .course-thumb img,
.gallery-main:hover,
.image-list label:hover img {
  filter: saturate(1.14) brightness(1.03);
}

.course-card:hover .course-thumb img,
.hero-panel:hover img {
  transform: scale(1.04);
}

.back-to-top,
.back-to-top:hover {
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.back-to-top.is-visible {
  animation: none;
}

.site-footer {
  grid-template-columns: minmax(120px, 1fr) minmax(240px, auto) minmax(240px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 44px);
  font-size: 13px;
  line-height: 1.45;
}

.site-footer strong {
  font-size: 16px;
}

.footer-center {
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.footer-center a,
.footer-contact a {
  color: #fff;
  font-weight: 800;
}

.footer-contact {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.footer-contact-left {
  justify-items: start;
  text-align: left;
}

.footer-socials {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-body .admin-layout {
  box-sizing: border-box;
  width: min(100% - 24px, 1720px);
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0 30px;
}

.admin-body .admin-layout > section,
.admin-body .data-panel,
.admin-body .table-wrap {
  min-width: 0;
}

.admin-nav-group {
  display: grid;
  gap: 4px;
}

.admin-nav-label {
  padding: 9px 12px 3px;
  color: #8a9aa8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.admin-nav-group + .admin-nav-group {
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid #edf2f4;
}

.admin-nav-collapsible {
  display: block;
}

.admin-nav-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}

.admin-nav-collapsible[open] > summary {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.admin-nav-collapsible > summary:hover {
  background: rgba(127, 127, 127, 0.06);
}

.admin-nav-collapsible > summary::-webkit-details-marker {
  display: none;
}

.admin-nav-collapsible > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.admin-nav-collapsible[open] > summary::after {
  transform: rotate(45deg);
}

.admin-nav-collapsible > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.admin-nav-collapsible > .admin-nav-items {
  display: none;
}

.admin-nav-collapsible[open] > .admin-nav-items {
  display: grid;
  gap: 4px;
  margin: 2px 0 6px 12px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
}

.admin-nav .admin-nav-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  color: #8b5a16;
  background: transparent;
  border-color: #f1d9a8;
}

.admin-nav .admin-nav-support:hover,
.admin-nav .admin-nav-support:focus-visible {
  color: #8b5a16;
  background: transparent;
  border-color: #b87516;
}

.admin-nav-support small {
  padding: 2px 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 99px;
  font-size: 10px;
}

.admin-body .table-wrap {
  max-width: none;
}

@media (max-width: 1024px) {
  .home-eyebrow {
    display: none;
  }

  .interactive-bg.taiwan-time-sky {
    width: 100%;
    height: 62%;
    opacity: 0.58;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0.52) 82%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0.52) 82%, transparent 100%);
  }

  .home-hero[data-time-phase="night"] .taiwan-time-sky {
    opacity: 0.52;
  }
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f7fbf7;
  border: 1px solid #d8e7d4;
  border-radius: 18px;
}

.permission-grid.compact {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.permission-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #d8e7d4;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.permission-card:has(input:checked) {
  color: var(--blue);
  background: var(--soft-green);
  border-color: var(--blue);
}

.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}

.permission-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--blue);
  background: var(--soft-green);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.permission-editor {
  margin-top: 10px;
}

.permission-editor summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}

.permission-editor .mini-permissions-form {
  margin-top: 10px;
}

.editable-order-table input,
.payroll-edit-table input,
.payroll-edit-table select {
  min-width: 120px;
}

.payroll-edit-table input[readonly] {
  color: var(--ink);
  background: #f3f7f4;
  border-color: #dce9db;
  font-weight: 800;
}

.payroll-slip-layout .payroll-draft-panel {
  width: 100%;
  max-width: none;
  margin: 28px 0 40px;
  padding: clamp(16px, 2vw, 30px);
}

.payroll-slip-layout .payroll-edit-table {
  table-layout: fixed;
  min-width: 860px;
}

.payroll-slip-layout [data-payroll-mode="amount"] .payroll-edit-table {
  min-width: 640px;
}

.payroll-edit-col-type { width: 110px; }
.payroll-edit-col-quantity { width: 100px; }
.payroll-edit-col-unit,
.payroll-edit-col-amount { width: 120px; }
.payroll-edit-col-actions { width: 178px; }

.payroll-slip-layout .payroll-edit-table input,
.payroll-slip-layout .payroll-edit-table select {
  min-width: 0;
}

.payroll-slip-layout .payroll-edit-table td:last-child {
  white-space: nowrap;
}

@media screen and (min-width: 1025px) {
  .payroll-slip-layout .payroll-sheet {
    width: 100%;
    max-width: none;
    padding: clamp(20px, 2vw, 30px);
  }
}

.row-action-buttons {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 76px;
}

.payroll-edit-table .payroll-row-button {
  min-width: 72px;
  border-radius: 10px;
  box-shadow: none;
  white-space: nowrap;
}

.payroll-edit-table .payroll-row-button:hover {
  transform: none;
  box-shadow: none;
}

.mini-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--blue);
  background: #eef6ff;
  border: 1px solid #cfe3f8;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.mini-icon-button:hover {
  color: #fff;
  background: var(--blue);
}

.admin-body .mini-icon-button:hover {
  color: var(--blue);
  background: #eef6ff;
}

.editable-order-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.document-total-list {
  display: grid;
  justify-content: end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid #223246;
}

.document-total-list div {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  min-width: 260px;
  font-size: 17px;
  font-weight: 800;
}

.document-total-list .final {
  color: var(--blue);
  font-size: 24px;
}

.report-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.report-panel-head h2,
.report-panel-head p {
  margin: 0;
}

.report-panel-head p {
  color: var(--muted);
}

.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.chart-legend span::before {
  display: block;
  width: 22px;
  height: 4px;
  border-radius: 99px;
  content: "";
}

.legend-income::before,
.chart-line-income,
.chart-dot-income {
  stroke: var(--teal);
}

.legend-expense::before,
.chart-line-expense,
.chart-dot-expense {
  stroke: var(--coral);
}

.legend-net::before,
.chart-line-net,
.chart-dot-net {
  stroke: var(--blue);
}

.legend-income::before {
  background: var(--teal);
}

.legend-expense::before {
  background: var(--coral);
}

.legend-net::before {
  background: var(--blue);
}

.report-chart-wrap {
  overflow: hidden;
  padding: 8px 0 14px;
}

.google-report-chart {
  width: 100%;
  min-height: 360px;
}

.report-chart {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: #e5eee2;
  stroke-width: 1;
}

.chart-zero {
  stroke: #9fb2a0;
  stroke-dasharray: 5 6;
  stroke-width: 1.5;
}

.chart-axis-label,
.chart-month-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chart-month-label {
  text-anchor: middle;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-dot {
  fill: #fff;
  stroke-width: 3;
}

.chart-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
  pointer-events: all;
}

.chart-tooltip {
  position: fixed;
  z-index: 120;
  display: grid;
  gap: 3px;
  min-width: 138px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(25, 45, 34, 0.94);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 35, 24, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.monthly-report-table {
  margin-top: 10px;
}

@media (max-width: 860px) {
  .campus-grid,
  .checkbox-grid,
  .permission-grid,
  .document-head,
  .document-meta,
  .bar-row,
  .report-panel-head,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer,
  .footer-contact {
    text-align: center;
    justify-items: center;
  }

  .paper-receipt {
    padding: 26px 18px;
  }

  .receipt-no {
    position: static;
    margin-bottom: 10px;
    text-align: right;
  }

  .receipt-contact,
  .receipt-buyer-row,
  .receipt-footer {
    flex-direction: column;
    gap: 8px;
  }

  .receipt-brand-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .receipt-brand-row img {
    width: 70px;
  }

  .receipt-brand-row h1 {
    font-size: 26px;
    letter-spacing: 1px;
  }

  .receipt-grid-table th,
  .receipt-grid-table td,
  .receipt-grid-table tfoot td,
  .receipt-signature-grid div {
    font-size: 13px;
    letter-spacing: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .admin-nav,
  .no-print,
  .print-actions,
  .site-mascots,
  .back-to-top {
    display: none !important;
  }

  .admin-layout {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .print-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .paper-receipt {
    max-width: none;
    color: #000;
    background: #fff;
    page-break-inside: avoid;
  }

  .receipt-grid-table th,
  .receipt-grid-table td,
  .receipt-signature-grid,
  .receipt-signature-grid div,
  .receipt-notes {
    border-color: #000;
  }

  .receipt-notes p {
    font-size: 10.4px;
  }
}

/* 2026-06 navigation, featured courses, documents and about page */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  min-height: 0;
  padding: 10px 5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: var(--blue);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 50;
  display: none;
  width: 220px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-menu a {
  padding: 9px 11px;
  color: var(--ink);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  color: var(--blue);
  background: var(--soft-green);
}

.featured-carousel {
  position: relative;
}

.featured-slide {
  display: none;
}

.featured-slide.is-active {
  display: block;
}

.featured-slide[aria-hidden="true"] {
  visibility: hidden;
}

.featured-slide.is-active[aria-hidden="false"] {
  visibility: visible;
}

.featured-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px 18px;
}

.featured-carousel-controls > button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 34px;
  padding: 0;
  color: var(--blue);
  background: var(--soft-green);
  border: 1px solid #cfe0cc;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.featured-carousel-controls > button img {
  width: 18px;
  height: 18px;
}

.featured-carousel-dots {
  display: flex;
  gap: 7px;
}

.featured-carousel-dots button {
  width: 10px;
  height: 10px;
  min-height: 0;
  padding: 0;
  background: #d3e2d1;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.featured-carousel-dots button.is-active {
  background: var(--blue);
  transform: scale(1.25);
}

.badge-featured {
  margin-left: 5px;
  color: #8a5b00;
  background: #fff5d9;
  border-color: #f2d58c;
}

.map-link {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  color: var(--blue);
  background: var(--soft-green);
  border: 1px solid #cfe0cc;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.paper-receipt > .print-actions {
  justify-content: flex-start;
  max-width: calc(100% - 250px);
  margin: 0 250px 42px 0;
}

.receipt-signature-grid strong {
  color: #4d4d4d;
  font-size: 14px;
  letter-spacing: 0;
}

.site-footer {
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  min-height: 84px;
  height: 84px;
  padding: 9px clamp(18px, 5vw, 64px);
  gap: 18px;
  font-size: 12px;
  line-height: 1.3;
}

.site-footer .footer-contact {
  gap: 3px;
}

.site-footer .footer-contact strong {
  display: inline;
  font-size: 14px;
}

.about-hero {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 0;
  padding: clamp(72px, 10vw, 130px) 18px 36px;
  overflow: hidden;
  text-align: center;
}

.about-hero::before {
  position: absolute;
  inset: 8% 12%;
  z-index: -1;
  background: radial-gradient(circle, rgba(232, 245, 233, 0.94), rgba(255, 248, 231, 0));
  content: "";
}

.about-hero-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  overflow: hidden;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(45, 140, 63, 0.2);
}

.about-hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 7vw, 82px);
  line-height: 1.14;
  letter-spacing: 0.08em;
}

.about-lead {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
}

.about-story {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding-top: clamp(20px, 3vw, 36px);
}

.about-intro {
  max-width: 880px;
  margin: 0 auto 64px;
  text-align: center;
}

.about-intro > p {
  color: var(--muted);
  font-size: 18px;
}

.about-intro h2 {
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.35;
}

.about-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.about-copy-grid article {
  padding: clamp(24px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.about-copy-grid article > span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.about-copy-grid h3 {
  margin: 8px 0 14px;
  font-size: 26px;
}

.about-copy-grid p,
.about-media-copy p {
  color: #486a4b;
  font-size: 17px;
  line-height: 1.9;
}

.about-quote-band {
  margin: 70px 0;
  padding: clamp(54px, 8vw, 96px) 18px;
  color: #fff;
  background: var(--ink);
  text-align: center;
}

.about-quote-band blockquote {
  max-width: 900px;
  margin: 0 auto;
}

.about-quote-band p:first-child {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
}

.about-quote-band p[lang="en"] {
  color: rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 17px;
}

.about-quote-band cite {
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
}

.about-media {
  width: min(100%, 1060px);
  margin: 0 auto;
}

.about-video {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #102217;
  border: 10px solid #fff;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.about-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.about-media-copy {
  max-width: 840px;
  margin: 34px auto 0;
  text-align: center;
}

.about-social {
  width: min(100%, 1160px);
  margin: 30px auto 70px;
}

.about-social-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(70px, 1fr));
  gap: 14px;
}

.about-social-grid a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.about-social-grid a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.about-social-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.about-social-grid .social-platform-youtube {
  background: #ff0033;
  border-color: #ff0033;
}

.about-social-grid .social-platform-line {
  background: #06c755;
  border-color: #06c755;
}

.about-social-grid .social-platform-facebook {
  background: #1877f2;
  border-color: #1877f2;
}

.about-social-grid .social-platform-instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d 58%, #fcb045);
  border-color: #c13584;
}

.about-social-grid .social-platform-apple-podcasts {
  background: #9b51e0;
  border-color: #9b51e0;
}

.about-social-grid .social-platform-kkbox {
  background: #00a6c8;
  border-color: #00a6c8;
}

.about-social-grid .social-platform-spotify {
  background: #1db954;
  border-color: #1db954;
}

.about-social-grid .social-platform-soundon {
  background: #5b3fbe;
  border-color: #5b3fbe;
}

@media (max-width: 1080px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
    height: auto;
    min-height: 84px;
  }

  .footer-center {
    display: none;
  }

  .about-social-grid {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    padding: 12px 0;
    color: var(--ink);
    font-size: 20px;
    text-align: left;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    position: static;
    display: grid;
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    box-shadow: none;
    transform: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    height: auto;
    padding: 16px;
  }

  .about-copy-grid {
    grid-template-columns: 1fr;
  }

  .paper-receipt > .print-actions {
    max-width: none;
    margin: 0 0 18px;
  }
}

@media (max-width: 560px) {
  .about-hero {
    min-height: 470px;
    padding-top: 64px;
  }

  .about-hero h1 {
    font-size: 40px;
    letter-spacing: 0.04em;
  }

  .about-social-grid {
    grid-template-columns: repeat(2, minmax(80px, 1fr));
  }
}

/* Latest news and bookmark navigation */
.mobile-nav-top {
  display: none;
}

.mobile-bookmark-panel {
  display: none;
}

.home-news-band {
  width: 100%;
  max-width: none;
  padding-right: max(clamp(16px, 5vw, 40px), calc((100vw - 1240px) / 2 + 40px));
  padding-left: max(clamp(16px, 5vw, 40px), calc((100vw - 1240px) / 2 + 40px));
  background: rgba(255, 255, 255, 0.72);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(216, 231, 212, 0.9);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  box-shadow: 0 18px 42px rgba(45, 140, 63, 0.16);
  transform: translateY(-4px);
}

.news-card-no-cover {
  border-top: 6px solid var(--blue);
}

.news-card-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  color: var(--blue);
  background: linear-gradient(135deg, #e8f5e9, #fff0d6);
  font-family: Georgia, serif;
  font-size: clamp(24px, 3vw, 38px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.news-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-cover img {
  transform: scale(1.045);
}

.news-card-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.news-card time,
.news-article-header time {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.news-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
}

.news-card h3 a:hover,
.news-read-more:hover {
  color: var(--blue);
}

.news-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-read-more {
  justify-self: start;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.news-empty {
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--line);
  border-radius: 22px;
  text-align: center;
}

.news-page-title {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) clamp(16px, 5vw, 40px) 20px;
}

.news-list-band {
  padding-top: 24px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  padding: 9px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.pagination a {
  color: var(--blue);
}

.news-article {
  width: min(100%, 940px);
  padding-top: clamp(48px, 8vw, 90px);
}

.news-article-header {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.news-back-link {
  display: block;
  margin-bottom: 20px;
  color: var(--blue);
  font-weight: 800;
}

.news-article-header h1 {
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.15;
}

.news-article-header p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.news-article-cover {
  width: 100%;
  max-height: 620px;
  margin-bottom: 34px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.news-rich-content {
  color: #284d30;
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.news-rich-content h2,
.news-rich-content h3,
.news-rich-content h4 {
  margin: 1.6em 0 0.65em;
  color: var(--ink);
  line-height: 1.3;
}

.news-rich-content h2 {
  font-size: 30px;
}

.news-rich-content h3 {
  font-size: 24px;
}

.news-rich-content p,
.news-rich-content ul,
.news-rich-content ol,
.news-rich-content blockquote {
  margin: 0 0 1.25em;
}

.news-rich-content a {
  color: var(--blue);
  text-decoration: underline;
}

.news-rich-content img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 18px;
}

.news-rich-content blockquote {
  padding: 18px 22px;
  color: #365e3b;
  background: var(--soft-green);
  border-left: 5px solid var(--blue);
  border-radius: 0 16px 16px 0;
}

.news-attachments {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.news-attachments h2 {
  margin: 0 0 16px;
}

.news-attachment-list {
  display: grid;
  gap: 10px;
}

.news-attachment-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 800;
}

.news-attachment-list small {
  flex: 0 0 auto;
  color: var(--muted);
}

.badge-published {
  color: #236632;
  background: #e8f5e9;
  border-color: #b9ddbf;
}

.badge-draft {
  color: #77591a;
  background: #fff5dc;
  border-color: #edd79e;
}

.news-editor-form.data-panel {
  width: 100%;
  margin: 0;
}

.news-current-cover img {
  width: min(240px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.rich-editor {
  overflow: hidden;
  background: #fff;
  border: 1px solid #cbdbe5;
  border-radius: 18px;
}

.rich-editor-toolbar {
  position: static;
  z-index: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  background: #f5faf5;
  border-bottom: 1px solid var(--line);
}

.rich-editor-toolbar button {
  min-height: 34px;
  padding: 6px 10px;
  color: #315a38;
  background: #fff;
  border: 1px solid #cfe0cc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.rich-editor-surface {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 440px;
  padding: clamp(18px, 3vw, 34px);
  cursor: text;
  caret-color: var(--ink);
  outline: 0;
  user-select: text;
  -webkit-user-select: text;
}

.rich-editor-surface:empty::before {
  color: #8aa08c;
  content: "從這裡開始撰寫，或直接貼上其他地方的文章內容…";
  pointer-events: none;
}

.rich-editor-surface.is-hidden {
  display: none;
}

.rich-editor-source {
  display: none;
  width: 100%;
  min-height: 440px;
  padding: 18px;
  color: #203c26;
  background: #f8fbf8;
  border: 0;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
}

.rich-editor-source.is-visible {
  display: block;
}

.rich-editor-status {
  padding: 8px 12px;
  color: var(--muted);
  background: #fbfdfb;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.news-admin-attachments {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #f7fbf7;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.news-admin-attachments h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.news-admin-attachments label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.news-publish-actions {
  position: sticky;
  bottom: 12px;
  justify-content: flex-end;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.about-hero-mark {
  width: 168px;
  height: 168px;
  margin-bottom: 26px;
}

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none !important;
  }

  .mobile-bookmark-panel {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 76px;
    left: auto;
    z-index: 52;
    display: none;
    grid-template-columns: 1fr;
    gap: 4px;
    width: min(230px, calc(100vw - 28px));
    max-height: min(58svh, 440px);
    padding: 8px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(13, 59, 26, 0.22);
    transform-origin: right bottom;
  }

  .mobile-bookmark-panel.is-open {
    display: grid;
    animation: bookmark-open 0.2s ease both;
  }

  .mobile-bookmark-panel a {
    display: block;
    padding: 7px 9px;
    color: var(--ink);
    background: #f7fbf7;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
  }

  .mobile-bookmark-panel a:hover,
  .mobile-bookmark-panel a:focus-visible {
    color: var(--blue);
    background: var(--soft-green);
    border-color: var(--line);
  }

  .mobile-bookmark-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 3px 6px 6px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  .mobile-bookmark-heading strong {
    font-size: 14px;
  }

  .mobile-bookmark-heading span {
    color: var(--muted);
    max-width: 120px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bookmark-top {
    color: var(--blue) !important;
    background: var(--soft-green) !important;
  }

  .mobile-bookmark-account {
    color: #fff !important;
    background: var(--blue) !important;
  }

  .back-to-top {
    z-index: 60;
  }

  .about-hero-mark {
    width: 136px;
    height: 136px;
  }
}

@keyframes bookmark-open {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

  .news-article-header {
    text-align: left;
  }

  .news-article-header h1 {
    font-size: 36px;
  }

  .news-rich-content {
    font-size: 16px;
  }

  .rich-editor-surface,
  .rich-editor-source {
    min-height: 360px;
  }

  .news-publish-actions {
    bottom: 8px;
    border-radius: 20px;
  }

  .news-publish-actions .button {
    flex: 1;
  }

  .about-hero-mark {
    width: 120px;
    height: 120px;
  }
}

.payroll-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(2, minmax(150px, 0.7fr)) auto;
  gap: 10px 12px;
  align-items: end;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #d7e7d5;
  border-radius: 16px;
  background: #f7fbf7;
}

.payroll-filter-bar .field {
  min-width: 0;
}

.payroll-filter-bar .field label {
  font-size: 12px;
}

.payroll-filter-bar input,
.payroll-filter-bar select {
  min-height: 38px;
  padding: 7px 10px;
}

.payroll-filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.payroll-filter-actions .button {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 13px;
  white-space: nowrap;
}

.payroll-filter-actions .button:hover {
  transform: none;
  box-shadow: none;
}

.payroll-filter-summary {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.payroll-table {
  min-width: 1120px;
  table-layout: auto;
}

.payroll-table th,
.payroll-table td {
  padding: 11px 10px;
  line-height: 1.45;
  vertical-align: top;
}

.payroll-table th {
  white-space: nowrap;
}

.payroll-table .payroll-col-actions {
  width: 205px;
  min-width: 205px;
}

.payroll-overtime-input {
  width: 88px !important;
  min-width: 88px !important;
  min-height: 36px;
  padding: 6px 9px;
}

.payroll-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 6px;
  min-width: 190px;
}

.payroll-actions > form {
  min-width: 0;
  margin: 0;
}

.payroll-actions .button {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

.payroll-actions .button:hover {
  transform: none;
  box-shadow: none;
}

.payroll-actions .badge {
  grid-column: 1 / -1;
  justify-self: start;
}

.payroll-table tbody tr.payroll-row-completed > td {
  background: #f4f9f2;
}

.payroll-table tbody tr.payroll-row-completed.is-notified > td {
  background: #eef8f1;
}

.payroll-table tbody tr.payroll-row-completed > td:first-child {
  box-shadow: inset 4px 0 0 rgba(45, 140, 63, 0.28);
}

@media (max-width: 1100px) {
  .payroll-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .payroll-filter-bar {
    grid-template-columns: 1fr;
  }

  .payroll-filter-summary {
    grid-column: 1;
  }
}

@media (min-width: 1025px) {
  .admin-body .admin-layout.payroll-admin-layout {
    width: calc(100% - 24px);
    max-width: none;
  }

  .admin-body .payroll-main-panel {
    width: 100%;
    max-width: none;
    margin: 28px 0 40px;
    padding: clamp(20px, 2vw, 30px);
  }

  .payroll-main-panel .payroll-table {
    min-width: 1030px;
  }

  .payroll-main-panel .payroll-col-actions {
    width: 185px;
    min-width: 185px;
  }

  .payroll-main-panel .payroll-actions {
    grid-template-columns: repeat(2, minmax(80px, 1fr));
    min-width: 170px;
  }
}

/* 0007: site-wide monochrome text and magenta button treatment */
body,
body * {
  color: #000 !important;
}

body .site-footer,
body .about-quote-band {
  color: #000 !important;
  background: #fff !important;
  border-top-color: #000 !important;
}

body :where(button, input[type="button"], input[type="submit"], input[type="reset"], .button, a.button),
body :where(button, input[type="button"], input[type="submit"], input[type="reset"], .button, a.button) * {
  color: #fff !important;
  background: #B60081 !important;
  border-color: #B60081 !important;
}

body .nav-toggle span {
  background: #fff !important;
}

/* Keep the shared back-to-top control aligned with the frontend treatment. */
body .back-to-top {
  color: #fff !important;
  background: #B60081 !important;
  border-color: #fff !important;
}

body .back-to-top-arrow {
  background: transparent !important;
  border-top-color: #fff !important;
  border-left-color: #fff !important;
}

/* Keep desktop navigation dropdowns visually neutral until hovered or opened. */
body .nav-dropdown-toggle {
  color: #000 !important;
  background: transparent !important;
  border-color: transparent !important;
}

/* About, faculty and space pages */
.faculty-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
  padding-top: clamp(62px, 8vw, 108px);
}

.faculty-hero-copy h1,
.faculty-title h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 78px);
  line-height: 1.08;
  letter-spacing: 0.06em;
}

.faculty-hero-copy > p:last-child {
  max-width: 720px;
  margin: 26px 0 0;
  font-size: 18px;
  line-height: 1.9;
}

.faculty-hero > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.faculty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.faculty-tags span {
  padding: 7px 15px;
  background: #fff;
  border: 1px solid rgba(182, 0, 129, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.faculty-title {
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: 24px;
  text-align: center;
}

.faculty-title .eyebrow {
  margin-bottom: 12px;
}

.faculty-directory,
.faculty-group {
  padding-top: 38px;
}

.faculty-group + .faculty-group {
  padding-top: 26px;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.faculty-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 231, 238, 0.92);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.faculty-card > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.faculty-card-copy {
  padding: 22px;
}

.faculty-card-copy h3 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.45;
}

.faculty-card-copy p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.75;
}

.faculty-card-portrait .faculty-card-copy {
  text-align: center;
}

.faculty-card-portrait .faculty-card-copy h3 {
  margin-bottom: 0;
}

.faculty-video-section {
  margin-top: clamp(28px, 5vw, 66px);
  margin-bottom: 60px;
}

.faculty-video-section .section-head {
  justify-content: center;
  text-align: center;
}

.faculty-video-section .section-head p:last-child {
  margin-right: auto;
  margin-left: auto;
}

.faculty-video {
  max-width: 1040px;
  margin: 0 auto;
}

.about-space {
  padding-top: clamp(62px, 8vw, 94px);
  padding-bottom: 12px;
}

.space-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.space-card {
  grid-column: span 2;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(219, 231, 238, 0.92);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.space-card:nth-last-child(-n + 2) {
  grid-column: span 3;
}

.space-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.space-card div {
  padding: 20px 22px 24px;
}

.space-card h3 {
  margin: 0;
  font-size: 22px;
}

.space-card p {
  margin: 7px 0 0;
  font-size: 16px;
}

@media (max-width: 920px) {
  .faculty-hero {
    grid-template-columns: 1fr;
  }

  .faculty-hero > img {
    max-height: 560px;
  }

  .faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .space-card,
  .space-card:nth-last-child(-n + 2) {
    grid-column: span 3;
  }
}

@media (max-width: 620px) {
  .faculty-hero {
    padding-top: 52px;
  }

  .faculty-hero-copy h1,
  .faculty-title h1 {
    font-size: 42px;
  }

  .faculty-hero-copy > p:last-child {
    font-size: 16px;
  }

  .faculty-grid {
    grid-template-columns: 1fr;
  }

  .faculty-card-copy {
    padding: 20px;
  }

  .space-card,
  .space-card:nth-last-child(-n + 2) {
    grid-column: span 6;
  }
}

/* Course management: compact titles and separate, unbroken price columns. */
.course-admin-layout > section { min-width: 0; }
.course-admin-layout .course-admin-table { width: 100%; min-width: 1240px; table-layout: fixed; }
.course-admin-table .course-col-title { width: 20%; }
.course-admin-table .course-col-category, .course-admin-table .course-col-teacher { width: 8%; }
.course-admin-table .course-col-campus { width: 6%; }
.course-admin-table .course-col-price, .course-admin-table .course-col-capacity { width: 8%; }
.course-admin-table .course-col-status { width: 10%; }
.course-admin-table .course-col-actions { width: 16%; }
.course-admin-table th, .course-admin-table td { padding: 12px 10px; vertical-align: top; }
.course-admin-table th, .course-admin-table .course-price-cell,
.course-admin-table td:nth-child(4) { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.course-admin-table td:first-child, .course-admin-table td:nth-child(2),
.course-admin-table td:nth-child(3) { overflow-wrap: anywhere; }
.course-admin-table .course-price-cell { font-variant-numeric: tabular-nums; }
.course-admin-table .course-list-action-cell, .course-admin-table .course-list-status-cell { width: auto; min-width: 0; }
.course-admin-table .course-list-actions > small { max-width: 100%; overflow-wrap: anywhere; }

/* Music payroll editor: keep inputs together and the results easy to scan. */
.payroll-slip-layout .payroll-edit-table .is-music-share > td {
  vertical-align: top;
  background: #fbfdfb;
}
.payroll-slip-layout .payroll-edit-table .is-music-share > td[hidden],
.payroll-slip-layout [data-payroll-music][hidden] { display: none !important; }
.payroll-music-card {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #dce8dc;
  border-radius: 16px;
  background: #fff;
  white-space: normal;
}
.payroll-music-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 16px;
}
.payroll-music-heading > span { font-weight: 800; color: #315e43; }
.payroll-music-heading small, .payroll-music-help { color: #718276; font-size: 12px; }
.payroll-music-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.payroll-music-grid .field { display: flex; flex-direction: column; gap: 7px; margin: 0; font-size: 13px; font-weight: 700; }
.payroll-slip-layout .payroll-music-grid input,
.payroll-slip-layout .payroll-music-grid select { width: 100%; padding: 10px 12px; border-radius: 10px; min-height: 44px; font-size: 15px; }
.payroll-music-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.payroll-music-totals > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 14px; border-radius: 12px; background: #eff6f0; color: #315e43; }
.payroll-music-totals > div + div { background: #f5f3ee; color: #756347; }
.payroll-music-totals span { font-size: 13px; }
.payroll-music-totals strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.payroll-music-help { display: block; margin-top: 12px; line-height: 1.6; }
@media (max-width: 1200px) {
  .payroll-music-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Course and lesson management filters and status navigation. */
html body.admin-body .course-admin-layout .course-admin-filter {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  grid-template-columns: minmax(240px, 1.6fr) minmax(170px, 1fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 18px 16px;
  padding: 24px;
  border: 1px solid var(--admin-border, #e5e7eb);
  border-radius: 16px;
  box-shadow: none;
}
html body.admin-body .course-admin-layout .course-admin-filter label,
html body.admin-body [data-lesson-filter] > .form-grid label {
  display: grid;
  min-width: 0;
  margin: 0;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--admin-text, #333) !important;
}
html body.admin-body .course-admin-layout .course-admin-filter input,
html body.admin-body [data-lesson-filter] > .form-grid input,
html body.admin-body .course-admin-layout .course-admin-filter select,
html body.admin-body [data-lesson-filter] > .form-grid select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--admin-border, #dedee3) !important;
  border-radius: 8px;
  background-color: var(--admin-input-background, #fff) !important;
  color: var(--admin-input-text, #333) !important;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}
html body.admin-body .course-admin-layout .course-admin-filter input::placeholder,
html body.admin-body [data-lesson-filter] > .form-grid input::placeholder {
  color: var(--admin-muted, #777) !important;
  opacity: 1;
  font-weight: 400;
}
html body.admin-body .course-admin-layout .course-admin-filter input:focus,
html body.admin-body [data-lesson-filter] > .form-grid input:focus,
html body.admin-body .course-admin-layout .course-admin-filter select:focus,
html body.admin-body [data-lesson-filter] > .form-grid select:focus {
  border-color: var(--admin-button-background, #b60081) !important;
  outline: 2px solid var(--admin-border, #e5e7eb);
  outline-offset: 2px;
}
html body.admin-body .course-admin-layout [data-course-filter-clear] {
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 10px 20px;
  border: 1px solid var(--admin-border, #dedee3) !important;
  border-radius: 8px;
  background: transparent !important;
  color: var(--admin-text, #333) !important;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
html body.admin-body .course-admin-layout [data-course-filter-clear]:hover {
  border-color: var(--admin-button-background, #b60081) !important;
  color: var(--admin-button-background, #b60081) !important;
}
html body.admin-body .course-admin-layout .course-admin-filter-count {
  gap: 24px;
  align-items: center;
}
html body.admin-body .course-admin-layout .course-admin-filter-count button,
html body.admin-body .course-admin-layout .course-admin-filter-count button:hover,
html body.admin-body .course-admin-layout .course-admin-filter-count button:active {
  appearance: none;
  min-height: 42px;
  margin: 0;
  padding: 8px 0;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  color: var(--admin-muted, #777) !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
  white-space: nowrap;
}
html body.admin-body .course-admin-layout .course-admin-filter-count button:hover,
html body.admin-body .course-admin-layout .course-admin-filter-count button[aria-pressed="true"] {
  color: var(--admin-button-background, #b60081) !important;
}
html body.admin-body .course-admin-layout .course-admin-filter-count button[aria-pressed="true"] {
  border-bottom-color: var(--admin-button-background, #b60081) !important;
  font-weight: 600;
}
html body.admin-body .course-admin-layout .course-admin-filter-count button:focus-visible,
html body.admin-body .course-admin-layout [data-course-filter-clear]:focus-visible {
  outline: 2px solid var(--admin-button-background, #b60081);
  outline-offset: 4px;
}
@media (max-width: 1500px) {
  html body.admin-body .course-admin-layout .course-admin-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  html body.admin-body .course-admin-layout .course-admin-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  html body.admin-body .course-admin-layout .course-admin-filter {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    gap: 16px;
  }
  html body.admin-body .course-admin-layout .course-admin-filter-count { gap: 18px; }
}

/* Established lesson list: align filter labels above the controls. */
html body.admin-body [data-lesson-filter] > h2 {
  margin: 0 0 24px;
}
html body.admin-body [data-lesson-filter] > .form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 1fr) minmax(150px, 1fr);
  gap: 18px 16px;
  align-items: end;
  margin: 0 0 20px;
  padding: 24px;
  border: 1px solid var(--admin-border, #e5e7eb);
  border-radius: 16px;
  box-sizing: border-box;
}
html body.admin-body [data-lesson-filter] > [data-lesson-count] {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--admin-muted, #777) !important;
}
@media (max-width: 1000px) {
  html body.admin-body [data-lesson-filter] > .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body.admin-body [data-lesson-filter] > .form-grid > label:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  html body.admin-body [data-lesson-filter] > .form-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    gap: 16px;
  }
}

/* Backoffice navigation follows the classroom brand button colour. */
html body.admin-body .site-nav > a:not(.button)::after,
html body.admin-body .nav-dropdown-toggle::after {
  background: var(--admin-button-background, #b60081) !important;
}
