:root {
  --archive-night: #110c0b;
  --archive-black: #090706;
  --archive-wine: #6f1722;
  --archive-wine-deep: #4b0f17;
  --archive-navy: #17243a;
  --archive-navy-soft: #24334a;
  --archive-gold: #b68a39;
  --archive-gold-light: #d8bd7a;
  --archive-paper: #f3e8d3;
  --archive-paper-light: #fff9ec;
  --archive-ink: #382a25;
  --archive-muted: #7a695b;
  --archive-line: rgba(126, 91, 43, 0.3);
  --archive-line-strong: rgba(182, 138, 57, 0.62);
  --archive-paper-image: url("./assets/theme/parchment-paper.jpg");
  --archive-leather-image: url("./assets/theme/leather-lacquer-bg.jpg");
  --archive-shadow: 0 24px 64px rgba(4, 2, 2, 0.4);
  --archive-paper-shadow: 0 16px 38px rgba(9, 5, 3, 0.22);
}

.treasure-theme {
  min-height: 100vh;
  background-color: var(--archive-night);
  background-image: var(--archive-leather-image);
  background-position: center top;
  background-size: 1536px auto;
  background-attachment: fixed;
  color: var(--archive-ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

.treasure-theme [hidden] {
  display: none !important;
}

.treasure-theme h1,
.treasure-theme h2,
.treasure-theme h3,
.treasure-theme h4,
.treasure-theme h5,
.treasure-theme .brand,
.treasure-theme .portal-summary strong,
.treasure-theme .student-hub-summary strong {
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  letter-spacing: 0;
}

.treasure-theme .site-header {
  min-height: 76px;
  border-bottom: 1px solid rgba(216, 189, 122, 0.32);
  background-color: rgba(13, 8, 7, 0.96);
  background-image: var(--archive-leather-image);
  background-position: center 18%;
  background-size: 1536px auto;
  color: #f2dfb0;
  box-shadow: 0 8px 28px rgba(4, 2, 2, 0.24);
  backdrop-filter: blur(16px);
}

.treasure-theme .brand {
  gap: 12px;
  color: #ead6a4;
  font-size: 18px;
  font-weight: 650;
}

.treasure-theme .brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(216, 189, 122, 0.72);
  border-radius: 50%;
  background: #fffaf4;
  box-shadow: 0 0 0 3px rgba(182, 138, 57, 0.08);
}

.treasure-theme .brand-mark img {
  transform: none;
}

.treasure-theme .main-nav {
  gap: 30px;
  color: rgba(242, 223, 176, 0.72);
  font-size: 14px;
}

.treasure-theme .main-nav a,
.treasure-theme .header-link {
  color: rgba(242, 223, 176, 0.72);
  transition: color 160ms ease;
}

.treasure-theme .main-nav a:hover,
.treasure-theme .main-nav a:focus-visible,
.treasure-theme .header-link:hover,
.treasure-theme .header-link:focus-visible {
  color: #fff1c9;
}

.treasure-theme .header-action,
.treasure-theme .primary-button,
.treasure-theme :where(button:not(.account-avatar):not(.teacher-note-toggle):not(.teacher-note-close)) {
  border: 1px solid rgba(216, 189, 122, 0.58);
  border-radius: 6px;
  background: var(--archive-wine);
  color: #fff5d9;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(37, 6, 10, 0.16);
}

.treasure-theme .header-action {
  min-height: 42px;
  padding-inline: 18px;
  background: var(--archive-navy);
}

.treasure-theme .secondary-button,
.treasure-theme .ghost-button {
  min-height: 42px;
  border: 1px solid rgba(182, 138, 57, 0.46);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.08);
  color: inherit;
  box-shadow: none;
}

.treasure-theme .primary-button:hover,
.treasure-theme .header-action:hover,
.treasure-theme :where(button:not(.account-avatar):not(.teacher-note-toggle):not(.teacher-note-close)):hover {
  border-color: rgba(232, 207, 148, 0.88);
  background: var(--archive-wine-deep);
  transform: translateY(-1px);
}

.treasure-theme button:focus-visible,
.treasure-theme a:focus-visible,
.treasure-theme input:focus-visible,
.treasure-theme select:focus-visible,
.treasure-theme textarea:focus-visible,
.treasure-theme summary:focus-visible {
  outline: 2px solid var(--archive-gold-light);
  outline-offset: 3px;
}

.treasure-theme .eyebrow,
.treasure-theme .tag,
.treasure-theme .student-hub-heading > span,
.treasure-theme .inquiry-section-heading > span {
  color: #9a6f27;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Public home: the first viewport reads like a collection cover. */
.home-page main {
  padding: 22px 0 56px;
}

.home-page .hero {
  min-height: calc(100vh - 120px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 102px);
  border: 1px solid var(--archive-line-strong);
  border-radius: 8px;
  background: var(--archive-black);
  box-shadow: var(--archive-shadow), inset 0 0 0 6px rgba(7, 4, 3, 0.36);
}

.home-page .hero img {
  object-position: center 42%;
  opacity: 1;
}

.home-page .hero-shade {
  background: rgba(8, 5, 5, 0.46);
}

.home-page .hero-content {
  max-width: 690px;
  color: #fff6df;
}

.home-page .hero .eyebrow {
  color: var(--archive-gold-light);
}

.home-page .hero h1 {
  color: #fff4d7;
  font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  font-size: clamp(46px, 6.2vw, 82px);
  font-weight: 650;
  line-height: 1.08;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
}

.home-page .hero-copy {
  max-width: 620px;
  color: rgba(255, 246, 223, 0.84);
  font-size: clamp(17px, 1.8vw, 21px);
}

.home-page .hero .primary-button {
  background: var(--archive-wine);
}

.home-page .hero .secondary-button {
  color: #fff5da;
}

.home-page .hero-student-cta {
  gap: 9px;
  max-width: 500px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 189, 122, 0.64);
  border-radius: 6px;
  background-color: rgba(23, 36, 58, 0.94);
  background-image: var(--archive-leather-image);
  background-position: right center;
  background-size: 900px auto;
  color: #fff2cf;
  box-shadow: 0 16px 36px rgba(4, 2, 2, 0.34);
  backdrop-filter: none;
}

.home-page .hero-student-cta::before {
  display: none;
}

.home-page .cta-kicker,
.home-page .cta-meta em {
  color: rgba(255, 242, 207, 0.72);
}

.home-page .cta-row strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 650;
}

.home-page .cta-arrow {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  background: var(--archive-wine);
  color: #f6dfaa;
  font-size: 22px;
}

.home-page .cta-meta em {
  border: 1px solid rgba(216, 189, 122, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.home-page .student-gateway,
.home-page .stats,
.home-page .section,
.home-page .split-section {
  width: min(1180px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.home-page .student-gateway {
  margin-top: 16px;
  padding: 34px 42px;
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-navy);
  background-image: var(--archive-leather-image);
  background-position: center 68%;
  background-size: 1300px auto;
  box-shadow: var(--archive-shadow);
}

.home-page .student-gateway h2 {
  max-width: 780px;
  color: #f7e5ba;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 650;
}

.home-page .student-gateway p:not(.eyebrow) {
  color: rgba(247, 229, 186, 0.72);
  font-size: 16px;
}

.home-page .gateway-button {
  min-height: 62px;
  border: 1px solid rgba(225, 200, 139, 0.75);
  border-radius: 6px;
  background: var(--archive-wine);
  color: #fff3d2;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  box-shadow: 0 12px 28px rgba(7, 3, 3, 0.32);
}

.home-page .stats {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  background-size: 1180px auto;
  box-shadow: var(--archive-paper-shadow);
}

.home-page .stats div {
  min-height: 118px;
  border-color: var(--archive-line);
}

.home-page .stats strong {
  color: var(--archive-wine);
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
}

.home-page .stats span {
  color: var(--archive-muted);
}

.home-page .section,
.home-page .split-section {
  margin-top: 18px;
  padding: clamp(42px, 6vw, 72px);
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  background-position: center top;
  background-size: 1536px auto;
  box-shadow: var(--archive-paper-shadow);
}

.home-page .section-heading h2,
.home-page .student-intro h2 {
  color: var(--archive-wine-deep);
  font-family: "Songti SC", "STSong", serif;
  font-weight: 650;
}

.home-page .section-heading p:not(.eyebrow),
.home-page .student-intro p {
  color: var(--archive-muted);
}

.home-page .award-list article,
.home-page .certificate-gallery article,
.home-page .wechat-article-grid article,
.home-page .enroll-form {
  border: 1px solid var(--archive-line);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.52);
  box-shadow: 0 10px 24px rgba(75, 47, 28, 0.08);
}

.home-page .award-list article strong,
.home-page .award-list article h3,
.home-page .certificate-gallery h3,
.home-page .wechat-article-grid strong {
  color: var(--archive-ink);
  font-family: "Songti SC", "STSong", serif;
}

.home-page .certificate-gallery img,
.home-page .wechat-article-cover {
  border-color: rgba(126, 91, 43, 0.24);
  filter: saturate(0.92) contrast(0.98);
}

.home-page .wechat-article-action,
.home-page .certificate-gallery span,
.home-page .award-list .tag {
  color: var(--archive-wine);
}

.home-page .enrollment {
  margin-bottom: 0;
}

.home-page .enroll-form {
  margin-top: 28px;
  padding: 28px;
}

.home-page .site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 30px;
  border: 1px solid rgba(216, 189, 122, 0.32);
  border-radius: 7px;
  background-color: rgba(9, 6, 5, 0.88);
  background-image: var(--archive-leather-image);
  background-position: center bottom;
  background-size: 1200px auto;
  color: rgba(242, 223, 176, 0.74);
}

/* Shared portal shell: a playable archive without obscuring operational work. */
.treasure-theme.portal-body {
  background-color: var(--archive-night);
  background-image: var(--archive-leather-image);
}

.treasure-theme .portal-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 30px 32px 88px;
}

.treasure-theme .portal-hero {
  min-height: 318px;
  align-items: end;
  padding: clamp(32px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--archive-line-strong);
  border-radius: 8px;
  background-color: #15100e;
  background-image: url("./assets/optimized/cover-piano-growth.jpg");
  background-position: center 42%;
  background-size: cover;
  color: #fff3d2;
  box-shadow: var(--archive-shadow), inset 0 0 0 999px rgba(8, 5, 6, 0.56);
}

.treasure-theme .teacher-hero,
.treasure-theme .admin-hero {
  background-color: #15100e;
  background-image: url("./assets/optimized/cover-piano-growth.jpg");
  box-shadow: var(--archive-shadow), inset 0 0 0 999px rgba(10, 9, 15, 0.58);
}

.treasure-theme .portal-hero .eyebrow {
  color: var(--archive-gold-light);
}

.treasure-theme .portal-hero h1 {
  max-width: 800px;
  color: #fff2cf;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 650;
}

.treasure-theme .portal-hero p:not(.eyebrow) {
  color: rgba(255, 243, 210, 0.78);
  font-size: 16px;
}

.treasure-theme .portal-hero .secondary-button {
  color: #fff2cf;
}

.treasure-theme .portal-summary,
.treasure-theme .teacher-brief,
.treasure-theme .portal-panel,
.treasure-theme .journey-student-page,
.treasure-theme .admin-command-grid article,
.treasure-theme .teacher-audit-grid section,
.treasure-theme .teacher-followup-panel,
.treasure-theme .teacher-analytics-list article,
.treasure-theme .inquiry-create-card,
.treasure-theme .inquiry-list-card,
.treasure-theme .registration-panel {
  border-color: var(--archive-line-strong);
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  background-position: center top;
  background-size: 1536px auto;
  box-shadow: var(--archive-paper-shadow);
}

.treasure-theme .portal-summary {
  gap: 0;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
}

.treasure-theme .portal-summary article {
  min-width: 0;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid var(--archive-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.treasure-theme .portal-summary article:last-child {
  border-right: 0;
}

.treasure-theme .portal-summary span,
.treasure-theme .student-hub-summary span,
.treasure-theme .inquiry-metrics span,
.treasure-theme .credit-balance-board span {
  color: var(--archive-muted);
  font-size: 12px;
}

.treasure-theme .portal-summary strong,
.treasure-theme .student-hub-summary strong,
.treasure-theme .inquiry-metrics strong,
.treasure-theme .credit-balance-board strong {
  color: var(--archive-wine);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.treasure-theme .student-status-summary {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.treasure-theme .student-status-summary article {
  grid-column: span 2;
}

.treasure-theme .student-status-summary article:nth-child(1),
.treasure-theme .student-status-summary article:nth-child(2) {
  grid-column: span 3;
}

.treasure-theme .teacher-brief {
  grid-template-columns: 150px minmax(0, 1fr);
  margin: 16px 0;
  padding: 18px 22px;
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
}

.treasure-theme .teacher-brief h2 {
  color: var(--archive-wine-deep);
  font-family: "Songti SC", "STSong", serif;
}

.treasure-theme .teacher-brief-list article {
  border: 1px solid rgba(126, 91, 43, 0.2);
  border-radius: 5px;
  background: rgba(255, 249, 236, 0.46);
}

.treasure-theme .teacher-brief-list strong,
.treasure-theme .teacher-brief-list p {
  color: var(--archive-ink);
}

.treasure-theme .teacher-brief-list p {
  color: var(--archive-muted);
}

.treasure-theme .teacher-sticky-note {
  border-color: rgba(182, 138, 57, 0.44);
  background-color: #f0dfb7;
  background-image: var(--archive-paper-image);
  box-shadow: 0 18px 36px rgba(68, 41, 22, 0.16);
}

.treasure-theme .portal-tabs {
  gap: 0;
  margin: 18px 0 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-navy);
  background-image: var(--archive-leather-image);
  background-position: center 70%;
  background-size: 1200px auto;
  box-shadow: 0 14px 34px rgba(4, 2, 2, 0.3);
}

.treasure-theme .portal-tabs button {
  min-height: 48px;
  margin: 0;
  border: 0 !important;
  border-right: 1px solid rgba(216, 189, 122, 0.2);
  border-radius: 4px;
  background: transparent !important;
  color: rgba(245, 226, 182, 0.62);
  box-shadow: none !important;
  font-size: 14px;
}

.treasure-theme .portal-tabs button:last-child {
  border-right: 0;
}

.treasure-theme .portal-tabs button:hover {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f6dfaa;
  transform: none;
}

.treasure-theme .portal-tabs button.is-active {
  min-height: 48px;
  border: 1px solid rgba(216, 189, 122, 0.48) !important;
  background: var(--archive-wine) !important;
  color: #fff1c9;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.treasure-theme .admin-leaf-tabs {
  top: 76px;
  flex-wrap: wrap;
  overflow: visible;
}

.treasure-theme .admin-leaf-tabs button {
  flex: 1 1 110px;
}

.treasure-theme .portal-tabs ~ .portal-page.is-active:not(.portal-panel):not(.journey-student-page) {
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.treasure-theme .portal-tabs ~ .portal-panel.portal-page.is-active,
.treasure-theme .portal-tabs ~ .journey-student-page.is-active {
  margin-top: 16px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  background-position: center top;
  background-size: 1536px auto;
  box-shadow: var(--archive-paper-shadow);
}

.treasure-theme .single-portal-page {
  grid-template-columns: minmax(0, 1fr);
}

.treasure-theme .portal-panel,
.treasure-theme .journey-student-page {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
}

.treasure-theme .portal-panel h2,
.treasure-theme .student-hub-heading h3,
.treasure-theme .journey-editor-header h3,
.treasure-theme .journey-v2-heading h3,
.treasure-theme .inquiry-section-heading h3 {
  color: var(--archive-wine-deep);
  font-family: "Songti SC", "STSong", serif;
  font-weight: 650;
}

.treasure-theme .panel-copy,
.treasure-theme .form-note,
.treasure-theme .admin-panel-hint,
.treasure-theme .journey-editor-note,
.treasure-theme .journey-v2-heading p {
  color: var(--archive-muted);
}

.treasure-theme .panel-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--archive-line);
}

.treasure-theme .panel-actions .ghost-button,
.treasure-theme .portal-panel .ghost-button,
.treasure-theme .journey-student-page .ghost-button {
  background: rgba(255, 249, 236, 0.5);
  color: var(--archive-ink);
}

/* Forms and controls remain plain, legible and fast for teachers. */
.treasure-theme label {
  color: #4d3d34;
}

.treasure-theme input,
.treasure-theme select,
.treasure-theme textarea {
  border: 1px solid rgba(126, 91, 43, 0.34);
  border-radius: 5px;
  background: rgba(255, 250, 239, 0.82);
  color: var(--archive-ink);
  box-shadow: inset 0 1px 2px rgba(70, 42, 24, 0.05);
}

.treasure-theme input:focus,
.treasure-theme select:focus,
.treasure-theme textarea:focus {
  border-color: var(--archive-gold);
  box-shadow: 0 0 0 3px rgba(182, 138, 57, 0.12);
}

.treasure-theme input:disabled,
.treasure-theme select:disabled,
.treasure-theme textarea:disabled {
  background: rgba(222, 208, 183, 0.48);
  color: #857668;
}

.treasure-theme .booking-credit-note,
.treasure-theme .availability-toolbar,
.treasure-theme .admin-schedule-controls,
.treasure-theme .student-manager-toolbar,
.treasure-theme .journey-teacher-student-picker,
.treasure-theme .admin-search-field,
.treasure-theme .inquiry-toolbar {
  border-color: var(--archive-line);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.42);
}

.treasure-theme .teacher-card-picker {
  gap: 10px;
}

.treasure-theme .teacher-card {
  min-height: 94px;
  border: 1px solid rgba(126, 91, 43, 0.28);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.58);
  color: var(--archive-ink);
  box-shadow: none;
}

.treasure-theme .teacher-card:hover,
.treasure-theme .teacher-card.is-selected {
  border-color: var(--archive-gold);
  background: rgba(255, 249, 236, 0.9);
  box-shadow: 0 10px 24px rgba(74, 44, 25, 0.12);
}

.treasure-theme .teacher-card.is-selected {
  box-shadow: inset 4px 0 var(--archive-wine), 0 10px 24px rgba(74, 44, 25, 0.12);
}

.treasure-theme .teacher-card-avatar,
.treasure-theme .account-avatar {
  border: 2px solid var(--archive-gold-light);
  background: var(--archive-navy);
  color: #fff0c8;
}

.treasure-theme .teacher-card-body em {
  border-radius: 4px;
  background: rgba(182, 138, 57, 0.14);
  color: #7b571d;
}

.treasure-theme .date-strip {
  gap: 8px;
}

.treasure-theme .date-strip button {
  border: 1px solid rgba(126, 91, 43, 0.28);
  border-radius: 5px;
  background: rgba(255, 249, 236, 0.5) !important;
  color: var(--archive-ink);
  box-shadow: none !important;
}

.treasure-theme .date-strip button.is-active,
.treasure-theme .date-strip button:hover {
  border-color: var(--archive-gold);
  background: var(--archive-navy) !important;
  color: #fff0c8;
}

.treasure-theme .availability-legend {
  color: var(--archive-muted);
}

.treasure-theme .availability-legend i {
  border-color: rgba(126, 91, 43, 0.3);
}

.treasure-theme .timeline-row {
  border-color: rgba(126, 91, 43, 0.2);
  background: rgba(255, 249, 236, 0.38);
}

.treasure-theme .timeline-row:hover {
  border-color: rgba(182, 138, 57, 0.52);
  background: rgba(255, 249, 236, 0.72);
}

.treasure-theme .timeline-row time strong {
  color: var(--archive-wine);
  font-family: Georgia, "Times New Roman", serif;
}

.treasure-theme .timeline-track {
  border-color: rgba(126, 91, 43, 0.22);
  background: rgba(255, 250, 240, 0.56);
}

.treasure-theme .timeline-row.is-booked .timeline-track,
.treasure-theme .timeline-row.is-completed .timeline-track {
  border-color: rgba(182, 138, 57, 0.5);
  background: rgba(228, 208, 162, 0.38);
}

.treasure-theme .timeline-row.is-closed .timeline-track,
.treasure-theme .timeline-row.is-past .timeline-track {
  background: rgba(131, 116, 98, 0.08);
}

.treasure-theme .teacher-row-more {
  border: 0 !important;
  background: transparent !important;
  color: var(--archive-wine) !important;
  box-shadow: none !important;
}

.treasure-theme .student-hub-summary,
.treasure-theme .credit-balance-board,
.treasure-theme .inquiry-metrics,
.treasure-theme .teacher-ops-summary {
  overflow: hidden;
  border: 1px solid var(--archive-line);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.38);
}

.treasure-theme .student-hub-summary article,
.treasure-theme .credit-balance-board article,
.treasure-theme .inquiry-metrics article,
.treasure-theme .teacher-ops-summary article {
  border-color: var(--archive-line);
  background: transparent;
}

.treasure-theme .student-hub-section,
.treasure-theme .teacher-certificate-section,
.treasure-theme .journey-editor-section,
.treasure-theme .journey-editor-ability-group,
.treasure-theme .journey-semester-manager,
.treasure-theme .journey-framework-panel,
.treasure-theme .journey-framework-category-body,
.treasure-theme .journey-framework-edit-form {
  border-color: var(--archive-line);
  background: rgba(255, 249, 236, 0.28);
}

.treasure-theme .student-hub-grid {
  border-color: var(--archive-line);
}

.treasure-theme .redemption-list article,
.treasure-theme .teacher-certificate-item,
.treasure-theme .student-certificate-card,
.treasure-theme .admin-certificate-card,
.treasure-theme .credit-ledger article,
.treasure-theme .account-item,
.treasure-theme .registration-list article,
.treasure-theme .inquiry-list article {
  border-color: rgba(126, 91, 43, 0.22);
  background: rgba(255, 249, 236, 0.42);
}

.treasure-theme .student-certificate-card,
.treasure-theme .admin-certificate-card {
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(67, 41, 24, 0.1);
}

.treasure-theme .student-certificate-card img,
.treasure-theme .admin-certificate-preview img {
  filter: saturate(0.94) contrast(0.98);
}

.treasure-theme .admin-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.treasure-theme .admin-command-grid,
.treasure-theme .admin-alert-grid {
  gap: 14px;
}

.treasure-theme .admin-command-grid article,
.treasure-theme .teacher-analytics-list article,
.treasure-theme .teacher-audit-grid section,
.treasure-theme .teacher-followup-panel {
  border: 1px solid var(--archive-line-strong);
  border-radius: 6px;
}

.treasure-theme .admin-command-grid strong,
.treasure-theme .teacher-analytics-main strong,
.treasure-theme .teacher-audit-grid h3,
.treasure-theme .teacher-followup-panel h3 {
  color: var(--archive-wine-deep);
  font-family: "Songti SC", "STSong", serif;
}

.treasure-theme .admin-mini-list article,
.treasure-theme .teacher-audit-list article,
.treasure-theme .teacher-lesson-day,
.treasure-theme .teacher-lessons-list > article,
.treasure-theme .activity-row {
  border-color: rgba(126, 91, 43, 0.22);
  background: rgba(255, 249, 236, 0.42);
}

.treasure-theme .teacher-analytics-meter,
.treasure-theme .progress,
.treasure-theme .journey-progress-track,
.treasure-theme .journey-v2-progress-track {
  background: rgba(96, 75, 58, 0.15);
}

.treasure-theme .teacher-analytics-meter i,
.treasure-theme .progress span,
.treasure-theme .journey-progress-track span,
.treasure-theme .journey-v2-progress-track span {
  background: var(--archive-gold);
}

/* Music growth becomes the center of the collection-book feeling. */
.treasure-theme {
  --journey-bg: #f3e8d3;
  --journey-surface: #fff9ec;
  --journey-ink: #382a25;
  --journey-muted: #7a695b;
  --journey-line: rgba(126, 91, 43, 0.28);
  --journey-burgundy: #6f1722;
  --journey-forest: #3f5145;
  --journey-gold: #a97928;
}

.treasure-theme .journey-page-shell,
.treasure-theme .journey-editor-shell,
.treasure-theme .journey-catalog-editor {
  color: var(--archive-ink);
}

.treasure-theme .journey-v2-hero {
  padding: 22px 24px 30px;
  border: 1px solid var(--archive-line);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.4);
}

.treasure-theme .journey-v2-hero h2,
.treasure-theme .journey-v2-current-stage strong,
.treasure-theme .journey-v2-progress-block strong {
  color: var(--archive-wine-deep);
}

.treasure-theme .journey-v2-section {
  border-color: var(--archive-line);
}

.treasure-theme .journey-stage-path,
.treasure-theme .journey-weekly-list,
.treasure-theme .journey-milestone-card,
.treasure-theme .journey-timeline-list {
  border-color: var(--archive-line);
}

.treasure-theme .journey-node.is-current,
.treasure-theme .journey-weekly-item.is-current,
.treasure-theme .journey-semester-goal.is-current {
  border-color: var(--archive-gold);
  background: rgba(229, 207, 158, 0.32);
}

.treasure-theme .journey-editor-tabs,
.treasure-theme .journey-framework-tabs {
  border: 1px solid var(--archive-line);
  border-radius: 6px;
  background: rgba(255, 249, 236, 0.38);
}

.treasure-theme .journey-editor-tabs button,
.treasure-theme .journey-framework-tabs button {
  border-color: var(--archive-line);
  background: transparent;
  color: var(--archive-muted);
  box-shadow: none;
}

.treasure-theme .journey-editor-tabs button.is-active,
.treasure-theme .journey-framework-tabs button.is-active {
  border-color: var(--archive-wine);
  background: var(--archive-wine);
  color: #fff1cd;
}

.treasure-theme .journey-semester-create-form {
  border-color: var(--archive-line-strong);
  background-color: rgba(255, 249, 236, 0.42);
  background-image: var(--archive-paper-image);
  box-shadow: 0 14px 30px rgba(67, 41, 24, 0.1);
}

.treasure-theme .journey-semester-create-guide {
  border-color: var(--archive-line);
  background: var(--archive-navy);
  color: #fff0c8;
}

.treasure-theme .journey-semester-create-guide > span,
.treasure-theme .journey-semester-create-guide h5,
.treasure-theme .journey-semester-create-guide p,
.treasure-theme .journey-semester-create-guide small {
  color: inherit;
}

.treasure-theme .journey-semester-start-button {
  background: var(--archive-wine) !important;
  color: #fff1cd !important;
}

/* Account menu and dialogs inherit the same tactile archive language. */
.treasure-theme .account-popover,
.treasure-theme .profile-dialog-card,
.treasure-theme .booking-dialog-card,
.treasure-theme .consult-dialog-card,
.treasure-theme .schedule-editor-card,
.treasure-theme .teacher-lessons-card,
.treasure-theme .inquiry-editor-card,
.treasure-theme .account-editor-card,
.treasure-theme .certificate-dialog-card {
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  color: var(--archive-ink);
  box-shadow: var(--archive-shadow);
}

.treasure-theme dialog::backdrop {
  background: rgba(8, 5, 5, 0.72);
  backdrop-filter: blur(7px);
}

.treasure-theme .account-menu-item {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--archive-ink);
  box-shadow: none;
}

.treasure-theme .account-menu-item:hover {
  background: rgba(182, 138, 57, 0.12);
  color: var(--archive-ink);
  transform: none;
}

/* Login, registration and password recovery become the archive entrance. */
.treasure-theme.login-page {
  background-color: var(--archive-night);
  background-image: var(--archive-leather-image);
  background-position: center top;
  background-size: cover;
}

.treasure-theme .login-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  gap: clamp(34px, 6vw, 84px);
  padding: clamp(48px, 8vw, 92px) 34px;
}

.treasure-theme .login-copy {
  color: #fff0c8;
}

.treasure-theme .login-copy h1 {
  color: #fff0c8;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 650;
}

.treasure-theme .login-copy > p:not(.eyebrow) {
  color: rgba(255, 240, 200, 0.7);
}

.treasure-theme .login-highlights span {
  border: 1px solid rgba(216, 189, 122, 0.32);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 240, 200, 0.76);
}

.treasure-theme .login-card {
  border: 1px solid var(--archive-line-strong);
  border-radius: 7px;
  background-color: var(--archive-paper);
  background-image: var(--archive-paper-image);
  background-position: center top;
  background-size: 1000px auto;
  color: var(--archive-ink);
  box-shadow: var(--archive-shadow);
}

.treasure-theme .login-card h2,
.treasure-theme .password-card-heading h2 {
  color: var(--archive-wine-deep);
  font-family: "Songti SC", "STSong", serif;
}

.treasure-theme .login-card button {
  background: var(--archive-wine);
}

.treasure-theme .forgot-password-link,
.treasure-theme .password-back-link {
  color: var(--archive-wine);
}

.treasure-theme .registration-card {
  max-width: 720px;
}

@media (max-width: 1120px) {
  .treasure-theme .site-header {
    padding-inline: 28px;
  }

  .treasure-theme .main-nav {
    gap: 18px;
  }

  .treasure-theme .admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .treasure-theme .admin-summary article:nth-child(3) {
    border-right: 0;
  }

  .treasure-theme .admin-summary article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--archive-line);
  }
}

@media (max-width: 860px) {
  .treasure-theme .site-header {
    min-height: 68px;
    padding-inline: 20px;
  }

  .treasure-theme .brand-mark {
    width: 42px;
    height: 42px;
  }

  .treasure-theme .main-nav {
    display: none;
  }

  .treasure-theme .portal-shell {
    padding: 20px 20px 82px;
  }

  .treasure-theme .portal-hero {
    min-height: 278px;
  }

  .treasure-theme .student-status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-theme .student-status-summary article,
  .treasure-theme .student-status-summary article:nth-child(1),
  .treasure-theme .student-status-summary article:nth-child(2) {
    grid-column: span 1;
    border-bottom: 1px solid var(--archive-line);
  }

  .treasure-theme .student-status-summary article:nth-child(2n) {
    border-right: 0;
  }

  .treasure-theme .teacher-brief {
    grid-template-columns: 1fr;
  }

  .treasure-theme .teacher-brief-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-theme .admin-leaf-tabs {
    top: 68px;
  }
}

@media (max-width: 640px) {
  .treasure-theme {
    background-attachment: scroll;
  }

  .treasure-theme .site-header {
    min-height: 64px;
    padding: 0 14px;
  }

  .treasure-theme .brand {
    gap: 8px;
    font-size: 15px;
  }

  .treasure-theme .brand-mark {
    width: 38px;
    height: 38px;
  }

  .treasure-theme .header-actions {
    gap: 8px;
  }

  .treasure-theme .header-link {
    display: none;
  }

  .treasure-theme .site-header:has(.account-menu) .header-action {
    display: none;
  }

  .treasure-theme .header-action {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .home-page main {
    padding: 12px 0 28px;
  }

  .home-page .hero,
  .home-page .student-gateway,
  .home-page .stats,
  .home-page .section,
  .home-page .split-section,
  .home-page .site-footer {
    width: calc(100% - 24px);
  }

  .home-page .hero {
    min-height: min(650px, calc(100svh - 94px));
    padding: 38px 22px;
    align-items: end;
  }

  .home-page .hero img {
    object-position: 52% center;
  }

  .home-page .hero-shade {
    background: rgba(7, 5, 5, 0.42);
  }

  .home-page .hero h1 {
    max-width: 330px;
    font-size: clamp(38px, 10.8vw, 44px);
  }

  .home-page .hero-copy {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.7;
  }

  .home-page .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .home-page .hero-actions a {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    font-size: 13px;
  }

  .home-page .hero-student-cta {
    margin-top: 12px;
    padding: 14px 16px;
  }

  .home-page .cta-kicker,
  .home-page .cta-meta {
    display: none;
  }

  .home-page .cta-row strong {
    font-size: 23px;
  }

  .home-page .student-gateway {
    grid-template-columns: 1fr;
    margin-top: 12px;
    padding: 28px 22px;
  }

  .home-page .student-gateway h2 {
    font-size: 28px;
  }

  .home-page .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .home-page .stats div {
    min-height: 104px;
    padding: 20px;
    border-bottom: 1px solid var(--archive-line);
  }

  .home-page .stats div:nth-child(2n) {
    border-right: 0;
  }

  .home-page .stats strong {
    font-size: 23px;
  }

  .home-page .section,
  .home-page .split-section {
    margin-top: 12px;
    padding: 34px 22px;
  }

  .home-page .enroll-form {
    padding: 18px;
  }

  .home-page .site-footer {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 22px;
  }

  .treasure-theme .portal-shell {
    padding: 12px 12px 106px;
  }

  .treasure-theme .portal-hero {
    min-height: 252px;
    padding: 26px 22px;
  }

  .treasure-theme .portal-hero h1 {
    font-size: 38px;
  }

  .treasure-theme .portal-hero p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.65;
  }

  .treasure-theme .portal-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .treasure-theme .portal-hero-actions a {
    width: 100%;
    padding-inline: 10px;
    font-size: 13px;
  }

  .treasure-theme .portal-summary {
    margin: 12px 0;
  }

  .treasure-theme .portal-summary article {
    min-height: 82px;
    padding: 14px;
  }

  .treasure-theme .portal-summary strong {
    font-size: 19px;
  }

  .treasure-theme .teacher-brief {
    margin: 12px 0;
    padding: 16px;
  }

  .treasure-theme .teacher-brief-list {
    gap: 7px;
  }

  .treasure-theme .teacher-brief-list article {
    min-height: 78px;
    padding: 10px;
  }

  .treasure-theme.student-body .portal-tabs,
  .treasure-theme.teacher-body .portal-tabs {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    overflow: hidden;
    margin: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
    background-color: rgba(10, 7, 7, 0.97);
    background-image: var(--archive-leather-image);
    background-position: center bottom;
    background-size: 900px auto;
    box-shadow: 0 -12px 30px rgba(4, 2, 2, 0.34);
  }

  .treasure-theme.student-body .portal-tabs button,
  .treasure-theme.teacher-body .portal-tabs button,
  .treasure-theme.student-body .portal-tabs button.is-active,
  .treasure-theme.teacher-body .portal-tabs button.is-active {
    flex: 1 1 0;
    min-width: 0;
    min-height: 50px;
    padding: 6px 4px;
    border: 0;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.25;
  }

  .treasure-theme.student-body .portal-tabs button.is-active,
  .treasure-theme.teacher-body .portal-tabs button.is-active {
    background: var(--archive-wine);
    color: #fff0c8;
  }

  .treasure-theme.admin-body .admin-leaf-tabs {
    position: sticky;
    top: 64px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-top: 12px;
    scrollbar-width: none;
  }

  .treasure-theme.admin-body .admin-leaf-tabs::-webkit-scrollbar {
    display: none;
  }

  .treasure-theme.admin-body .admin-leaf-tabs button {
    flex: 0 0 auto;
    min-width: 88px;
    padding-inline: 12px;
  }

  .treasure-theme .portal-tabs ~ .portal-page.is-active:not(.portal-panel):not(.journey-student-page),
  .treasure-theme .portal-tabs ~ .portal-panel.portal-page.is-active,
  .treasure-theme .portal-tabs ~ .journey-student-page.is-active {
    margin-top: 12px;
  }

  .treasure-theme .portal-panel,
  .treasure-theme .journey-student-page {
    padding: 18px 16px;
  }

  .treasure-theme .panel-heading {
    padding-bottom: 14px;
  }

  .treasure-theme .panel-heading .ghost-button,
  .treasure-theme .panel-actions,
  .treasure-theme .panel-actions .ghost-button {
    width: 100%;
  }

  .treasure-theme .student-status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-theme .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasure-theme .admin-summary article:nth-child(3) {
    border-right: 1px solid var(--archive-line);
  }

  .treasure-theme .admin-summary article:nth-child(2n) {
    border-right: 0;
  }

  .treasure-theme .admin-summary article:nth-child(-n + 4) {
    border-bottom: 1px solid var(--archive-line);
  }

  .treasure-theme .booking-controls,
  .treasure-theme .admin-schedule-controls,
  .treasure-theme .journey-framework-main-fields,
  .treasure-theme .journey-ability-picker,
  .treasure-theme .inquiry-form-grid {
    grid-template-columns: 1fr;
  }

  .treasure-theme .teacher-card {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 84px;
    padding: 13px;
  }

  .treasure-theme .teacher-card-avatar {
    width: 50px;
    height: 50px;
  }

  .treasure-theme .timeline-row,
  .treasure-theme .teacher-timeline .timeline-row,
  .treasure-theme .teacher-timeline .timeline-row.is-full-hour {
    border-radius: 5px;
  }

  .treasure-theme .login-shell {
    padding: 44px 18px 68px;
  }

  .treasure-theme .login-copy h1 {
    font-size: 40px;
  }

  .treasure-theme .login-card {
    padding: 22px 18px;
  }
}

@media (max-width: 420px) {
  .treasure-theme .brand > span:last-child {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .treasure-theme .account-avatar {
    width: 38px;
    height: 38px;
  }

  .home-page .hero-actions {
    grid-template-columns: 1fr;
  }

  .home-page .hero-actions .secondary-button {
    display: none;
  }

  .treasure-theme .portal-hero-actions {
    grid-template-columns: 1fr;
  }

  .treasure-theme .portal-hero-actions .secondary-button {
    display: none;
  }

  .treasure-theme .student-status-summary,
  .treasure-theme .admin-summary {
    grid-template-columns: 1fr 1fr;
  }

  .treasure-theme .portal-summary article,
  .treasure-theme .admin-summary article:nth-child(3) {
    border-right: 1px solid var(--archive-line);
  }

  .treasure-theme .portal-summary article:nth-child(2n),
  .treasure-theme .admin-summary article:nth-child(2n) {
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .treasure-theme *,
  .treasure-theme *::before,
  .treasure-theme *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
