/* Shared courtyard portal theme: compact navigation and audience-specific characters. */
.courtyard-page {
  --room: #a65c44; --room-soft: #f3e2d3; --room-line: #d8bb9f;
  background: #faf5e9; background-image: radial-gradient(#b89c6e18 .7px, transparent .7px); background-size: 5px 5px;
  color: #435044; font-family: var(--site-font);
}
.courtyard-page.portal-teacher { --room: #4d705a; --room-soft: #e5ecdf; --room-line: #b6c5ac; }
.courtyard-page.student-school { --room: #aa6378; --room-soft: #f4e5e7; --room-line: #d8b8c1; }
.courtyard-page.portal-resources { --room: #996e36; --room-soft: #f2e7ce; --room-line: #d4bc8e; }
.courtyard-page *, .courtyard-page *::before, .courtyard-page *::after { box-sizing: border-box; }
.courtyard-topbar { max-width: 1240px; width: calc(100% - 64px); margin: 0 auto; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.courtyard-brand { display: flex; align-items: center; gap: 12px; color: #465444; text-decoration: none; flex-shrink: 0; }
.courtyard-brand img { width: 30px; height: 30px; transform: rotate(-5deg); }
.courtyard-brand strong { display: block; font-size: 19px; letter-spacing: 3px; }
.courtyard-brand small { font-size: 10px; color: #887d69; }
.courtyard-room-nav { display: flex; gap: 26px; align-items: center; }
.courtyard-room-nav a { color: #7a7d6a; text-decoration: none; padding: 10px 0; font-size: 14px; border-bottom: 2px solid transparent; }
.courtyard-room-nav a[aria-current=page] { color: var(--room); border-color: var(--room); }
.courtyard-room-nav a:hover { color: var(--room); }
.courtyard-page .site-header, .courtyard-page .student-header {
  isolation: isolate; position: relative; display: grid; grid-template-columns: 1fr; grid-template-rows: auto;
  width: calc(100% - 64px); max-width: 1240px; min-height: 112px; margin: 0 auto 8px; padding: 16px 150px 16px 156px;
  border: 1px solid #ddcfb6; border-radius: 16px 16px 30px 16px; overflow: hidden;
  background: #fff9eb; background-image: none;
  box-shadow: 0 4px 0 #e8dcc5, 0 7px 0 #fffaf0, 0 8px 0 #ded0b6;
}
.courtyard-page .site-header::before, .courtyard-page .student-header::before { display: none; }
.courtyard-page .site-header::after, .courtyard-page .student-header::after { content: ''; position: absolute; inset: 9px; border: 1px solid #cfba914a; border-radius: 11px 11px 24px 11px; background: none; height: auto; pointer-events: none; z-index: 5; }
.courtyard-hero-copy { grid-column: 1; z-index: 3; align-self: center; text-align: left; }
.courtyard-kicker { display: flex; align-items: center; gap: 10px; color: var(--room); font-size: 12px; letter-spacing: 2px; margin-bottom: 18px; }
.courtyard-kicker::before { content: ''; width: 24px; height: 1px; background: var(--room); }
.courtyard-page .courtyard-hero-copy h1 { font-size: clamp(26px, 2.7vw, 32px); color: #435343; letter-spacing: 5px; line-height: 1.3; text-align: left; margin: 0; text-shadow: none; }
.courtyard-page .courtyard-hero-copy h1 small { display: block; color: var(--room); font-size: 13px; letter-spacing: 1px; margin-top: 10px; font-weight: 400; }
.courtyard-page .courtyard-hero-copy p { font-size: 13px; line-height: 1.6; color: #81765e; margin: 7px 0 0; }
.courtyard-hero-note { display: inline-flex; gap: 8px; color: var(--room); font-size: 11px; margin-top: 23px; border-top: 1px solid var(--room-line); padding-top: 12px; letter-spacing: 1px; }
.courtyard-scenery { position: absolute; width: 52%; right: 0; top: 0; bottom: 0; background: linear-gradient(90deg,#fff9eb 0%,#fff9eb00 42%),url('../images/home-courtyard-background.png') 85% 55% / auto 130%; opacity: .7; mask-image: linear-gradient(0deg,transparent,black 20%); }
.portal-teacher .courtyard-scenery { background-position: center, 66% 40%; filter: saturate(.55); }
.student-school .courtyard-scenery { background-position: center, 10% 80%; }
.portal-resources .courtyard-scenery { background-position: center, 100% 80%; }
.courtyard-page .portal-art { display: block; position: absolute; right: 35px; bottom: 10px; width: 400px; height: 275px; margin: 0; z-index: 2; filter: drop-shadow(0 12px 7px #79623c22); }
.courtyard-page .portal-art img,.courtyard-page .portal-art svg { width: 100%; height: 100%; object-fit: contain; animation: none; }
.courtyard-page .teacher-art { width: 340px; right: 50px; height: 290px; }
.courtyard-page .student-art { width: 270px; right: 75px; height: 270px; }
.courtyard-page .sharing-art { width: 270px; right: 65px; height: 270px; }
.courtyard-room-tag { position: absolute; right: 27px; top: 27px; z-index: 4; writing-mode: vertical-rl; letter-spacing: 4px; font-size: 12px; color: var(--room); padding: 12px 8px; border: 1px solid var(--room-line); border-radius: 20px; background: #fff9ebd9; }
.courtyard-page .sticky-top { position: sticky; top: 0; background: #faf5e9f5; z-index: 35; }
.courtyard-page .tab-nav,.courtyard-page .category-nav { background: #faf5e9ed; padding: 6px 0; border: 0; }
.courtyard-page .tab-nav-inner,.courtyard-page .category-nav-inner { width: calc(100% - 80px); max-width: 1216px; gap: 10px; }
.courtyard-page .tab-btn,.courtyard-page .nav-pill,.courtyard-page .subject-tab-btn { border: 1px solid #dcd4c2; border-radius: 30px; box-shadow: none; min-height: 40px; padding: 9px 19px; background: #fffcf5; color: #746e5c; }
.courtyard-page .tab-btn.active,.courtyard-page .nav-pill.active,.courtyard-page .subject-tab-btn.active { background: var(--room); color: #fffdf5; border-color: var(--room); box-shadow: none; }
.courtyard-page .container,.courtyard-page .student-main { width: calc(100% - 64px); max-width: 1240px; padding: 10px 0 0; margin: 0 auto 40px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.courtyard-page .sticky-top + .container { margin-top: 0; }
.courtyard-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 3px 24px; margin-bottom: 9px; border-bottom: 1px solid #dfd6c2; }
.courtyard-intro strong { display: block; font-size: 20px; color: #4a5949; font-weight: 400; }
.courtyard-intro small { display: block; color: #8b826c; font-size: 11px; margin-top: 5px; }
.courtyard-intro > span { color: var(--room); font-size: 12px; }
.courtyard-page .container > section { margin: 16px 0 22px; }
.courtyard-page .section-title,.courtyard-page .section-heading { border: 0; background: none; padding: 6px 0; margin: 0 0 10px; color: #4a5949; font-size: 23px; }
.courtyard-page .section-title::before,.courtyard-page .section-title::after,.courtyard-page .section-heading::after { display: none; }
.courtyard-page .grid,.courtyard-page .grid.tile-grid { gap: 12px; }
.courtyard-page .card,.courtyard-page .card.tile-card,.courtyard-page .card.locked-card { background: #fffcf4; border: 1px solid #dfd4be; border-radius: 18px 18px 26px 18px; box-shadow: 0 3px 0 #e8ddc7; min-height: 112px; padding: 15px 16px; grid-template-columns: 44px minmax(0,1fr); gap: 14px; transition: transform .18s,box-shadow .18s; }
.courtyard-page .card:nth-child(3n+2),.courtyard-page .card:nth-child(3n) { background: #fffcf4; }
.courtyard-page .card .card-icon { background: var(--room-soft); border-radius: 12px; padding: 8px; width: 44px; height: 44px; }
.courtyard-page .card-icon .storybook-icon { width: 28px; height: 28px; }
.courtyard-page .card .card-title,.courtyard-page .card.tile-card .card-title,.courtyard-page.portal-family .card .card-title .zh { color: #4b5949; font-size: 19px; }
.courtyard-page .card .card-desc,.courtyard-page .card.tile-card .card-desc { color: #817661; font-size: 12px; line-height: 1.55; }
.courtyard-page .card-title .sub-title { color: var(--room); }
.courtyard-page .card:hover,.courtyard-page .student-card:hover { transform: translateY(-4px); border-color: var(--room); box-shadow: 0 6px 0 #e4d8bf,0 12px 20px #6251300c; }
.courtyard-page .card:has(.fav-pin),.courtyard-page .card.locked-card { padding-top: 40px; }
.courtyard-page.portal-family .card { border-top: 3px solid #d4a68a; }
.courtyard-page.portal-teacher .card { border-radius: 8px 18px 8px 8px; border-left: 4px solid #bac9ab; }
.courtyard-page.portal-resources .card { border-radius: 6px 18px 6px 6px; border-bottom: 4px solid #d9bd8e; }
.courtyard-page .student-grid,.courtyard-page .math-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.courtyard-page .student-card,.courtyard-page .math-section .student-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 104px; padding: 16px; background: #fffaf1; border: 1px solid #deceb8; border-radius: 24px 24px 36px 24px; box-shadow: 0 4px 0 #e8dcc6; }
.courtyard-page .chinese-section .student-card:nth-child(2n) { background: #f4e8e7; }
.courtyard-page .math-section .student-card:nth-child(2n+1) { background: #edf0e1; }
.courtyard-page .card-picture { width: 52px; height: 52px; background: #fffdf5; border-radius: 50%; padding: 4px; }
.courtyard-page .card-picture svg { width: 44px; height: 44px; }
.courtyard-page .card-label strong,.courtyard-page .math-grid .card-label strong { font-size: 23px; color: #535c47; }
.courtyard-page .card-arrow { position: absolute; right: 22px; top: 25px; }
.courtyard-page .portal-footer,.courtyard-page .student-footer { text-align: center; border: 0; background: none; padding: 20px 15px 35px; color: #93856b; }
.courtyard-page a:focus-visible,.courtyard-page button:focus-visible { outline: 3px solid var(--room); outline-offset: 4px; }
@media(max-width:1000px) {
  .courtyard-room-nav { gap: 16px; }
  .courtyard-page .site-header,.courtyard-page .student-header { padding: 36px; }
  .courtyard-page .portal-art { width: 320px; right: 10px; }
  .courtyard-page .teacher-art { width: 280px; }
  .courtyard-page .student-art,.courtyard-page .sharing-art { width: 230px; right: 25px; }
}
@media(max-width:760px) {
  .courtyard-topbar { width: calc(100% - 32px); min-height: 115px; padding: 16px 0 8px; flex-wrap: wrap; gap: 12px; }
  .courtyard-brand strong { font-size: 19px; }
  .courtyard-brand img { width: 34px; height: 34px; }
  .courtyard-room-nav { width: 100%; justify-content: space-between; gap: 6px; }
  .courtyard-room-nav a { font-size: 12px; padding: 6px 2px; }
  .courtyard-page .site-header,.courtyard-page .student-header { width: calc(100% - 28px); min-height: 380px; display: block; margin: 8px auto 20px; padding: 28px 25px; border-radius: 24px 24px 50px 24px; }
  .courtyard-page .site-header::after,.courtyard-page .student-header::after { border-radius: 18px 18px 43px 18px; }
  .courtyard-kicker { font-size: 10px; margin-bottom: 10px; }
  .courtyard-page .courtyard-hero-copy h1 { font-size: 33px; letter-spacing: 3px; }
  .courtyard-page .courtyard-hero-copy h1 small { font-size: 11px; margin-top: 6px; }
  .courtyard-page .courtyard-hero-copy p { font-size: 13px; margin-top: 13px; max-width: 85%; }
  .courtyard-hero-note { margin-top: 12px; font-size: 10px; }
  .courtyard-scenery { width: 100%; top: 150px; opacity: .45; background-size: cover,cover; }
  .courtyard-page .portal-art { width: 245px; height: 155px; right: 22px; bottom: 3px; }
  .courtyard-page .teacher-art { width: 210px; height: 165px; }
  .courtyard-page .student-art,.courtyard-page .sharing-art { width: 165px; height: 165px; right: 36px; }
  .courtyard-room-tag { top: 25px; right: 20px; font-size: 10px; padding: 10px 6px; }
  .courtyard-page .container,.courtyard-page .student-main { width: calc(100% - 32px); padding: 18px 0 0; }
  .courtyard-intro { align-items: flex-start; padding-bottom: 18px; gap: 10px; }
  .courtyard-intro strong { font-size: 18px; }
  .courtyard-intro > span { font-size: 10px; white-space: nowrap; }
  .courtyard-page .tab-nav-inner,.courtyard-page .category-nav-inner { width: calc(100% - 32px); gap: 7px; }
  .courtyard-page .tab-btn,.courtyard-page .nav-pill { padding: 8px 12px; font-size: 12px; }
  .courtyard-page .grid,.courtyard-page .grid.tile-grid,.courtyard-page .student-grid,.courtyard-page .math-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .courtyard-page .card,.courtyard-page .card.tile-card,.courtyard-page .card.locked-card { display: flex; flex-direction: column; padding: 18px 14px; min-height: 170px; gap: 10px; }
  .courtyard-page .card .card-title,.courtyard-page .card.tile-card .card-title,.courtyard-page.portal-family .card .card-title .zh { font-size: 17px; }
  .courtyard-page .card .card-desc { font-size: 11px; }
  .courtyard-page .student-card,.courtyard-page .math-section .student-card { min-height: 175px; padding: 20px 15px; gap: 12px; }
  .courtyard-page .card-label strong,.courtyard-page .math-grid .card-label strong { font-size: 20px; }
}
@media(prefers-reduced-motion:reduce) { .courtyard-page .card,.courtyard-page .student-card { transition: none; } }
.storybook-page.courtyard-page .site-header,.storybook-page.courtyard-page .student-header { background: #fff9eb; }
.storybook-page.courtyard-page .site-header::before,.storybook-page.courtyard-page .student-header::before { content: none; display: none; }
.storybook-page.courtyard-page .site-header::after,.storybook-page.courtyard-page .student-header::after { background: none; box-shadow: none; }
@media(min-width:761px) { .courtyard-page.portal-family #family-news .grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) { .courtyard-intro { flex-direction: column; gap: 12px; } }

/* Compact edition: the animal lives beside the title and inside the link rail. */
.courtyard-page .site-header,.courtyard-page .student-header { text-align: left; }
.courtyard-kicker,.courtyard-hero-note,.courtyard-room-tag { display: none; }
.courtyard-page .courtyard-hero-copy h1 small { display: inline-block; vertical-align: middle; margin: 0 0 0 14px; font-size: 12px; letter-spacing: .3px; }
.courtyard-page .courtyard-hero-copy h1::after { display: none; }
.courtyard-scenery { width: 180px; opacity: .22; top: 0; background-size: cover,auto 180%; mask-image: linear-gradient(90deg,transparent,#000); }
.courtyard-page .portal-art,.courtyard-page .teacher-art,.courtyard-page .student-art,.courtyard-page .sharing-art { left: 22px; right: auto; bottom: 5px; width: 116px; height: 106px; filter: drop-shadow(0 4px 3px #79623c18); }
.courtyard-page .family-art { width: 134px; left: 9px; }
.courtyard-page .student-art,.courtyard-page .sharing-art { width: 92px; left: 28px; }
.courtyard-page .site-header::after,.courtyard-page .student-header::after { inset: 5px; }
.courtyard-page .container::before,.courtyard-page .container::after,.courtyard-page .student-main::before,.courtyard-page .student-main::after { content: none; }
.courtyard-quick { display: flex; align-items: center; gap: 16px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--room-line); border-radius: 12px; background: var(--room-soft); }
.courtyard-quick-label { display: flex; align-items: center; flex-shrink: 0; gap: 8px; color: var(--room); font-size: 12px; }
.courtyard-quick-mascot { display: block; width: 36px; height: 34px; }
.courtyard-quick-mascot svg,.courtyard-quick-mascot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.courtyard-quick-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; gap: 10px; }
.courtyard-quick-links a { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; padding: 8px 12px; border: 1px solid #fff9ec; border-radius: 8px; color: #4a5949; background: #fffdf5; text-decoration: none; font-size: 14px; box-shadow: 0 1px 2px #6d573010; }
.courtyard-quick-links a::after { content: '›'; color: var(--room); }
.courtyard-quick-links a:hover { border-color: var(--room); }
.courtyard-page .section-title,.courtyard-page .section-heading { font-size: 20px; }
.courtyard-page .section-title .section-heading { padding: 0; margin: 0; }
.courtyard-page .card::after { display: none; }
.courtyard-page .card .card-title,.courtyard-page .card.tile-card .card-title,.courtyard-page.portal-family .card .card-title .zh { font-size: 17px; }
.courtyard-page .student-card,.courtyard-page .math-section .student-card { flex-direction: row; align-items: center; border-radius: 15px 15px 22px 15px; }
.courtyard-page .card-label strong,.courtyard-page .math-grid .card-label strong { font-size: 20px; }
.courtyard-page .student-grid,.courtyard-page .math-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.courtyard-page .subject-section { margin-bottom: 20px; }
.courtyard-page .card-arrow { position: static; margin-left: auto; }
.courtyard-page .card:has(.fav-pin),.courtyard-page .card.locked-card { padding-top: 32px; }
@media(max-width:1000px) {
  .courtyard-page .site-header,.courtyard-page .student-header { padding: 16px 90px 16px 146px; }
  .courtyard-page .student-grid,.courtyard-page .math-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .courtyard-quick { gap: 10px; }
  .courtyard-quick-links { gap: 6px; }
  .courtyard-quick-links a { font-size: 13px; padding: 8px; }
}
@media(max-width:760px) {
  .courtyard-topbar { min-height: 0; padding: 9px 0 7px; gap: 7px; }
  .courtyard-brand { gap: 8px; }
  .courtyard-brand img { width: 28px; height: 28px; }
  .courtyard-brand strong { font-size: 17px; }
  .courtyard-brand small { display: none; }
  .courtyard-room-nav { gap: 8px; width: auto; margin-left: auto; }
  .courtyard-room-nav a { font-size: 11px; white-space: nowrap; padding: 6px 0; }
  .courtyard-page .site-header,.courtyard-page .student-header { min-height: 100px; margin: 0 auto 6px; padding: 13px 12px 13px 104px; border-radius: 14px 14px 22px 14px; }
  .courtyard-page .site-header::after,.courtyard-page .student-header::after { border-radius: 10px 10px 18px 10px; }
  .courtyard-page .courtyard-hero-copy h1 { font-size: 26px; letter-spacing: 2px; }
  .courtyard-page .courtyard-hero-copy h1 small { display: block; margin: 3px 0 0; font-size: 10px; }
  .courtyard-page .courtyard-hero-copy p { font-size: 11px; margin: 5px 0 0; max-width: none; }
  .courtyard-page .portal-art,.courtyard-page .teacher-art,.courtyard-page .student-art,.courtyard-page .sharing-art { width: 84px; height: 88px; left: 10px; bottom: 5px; }
  .courtyard-page .family-art { width: 100px; left: 0; }
  .courtyard-page .student-art,.courtyard-page .sharing-art { width: 73px; left: 16px; }
  .courtyard-scenery { top: 0; width: 110px; opacity: .12; }
  .courtyard-page .tab-nav,.courtyard-page .category-nav { padding: 5px 0; }
  .courtyard-page .tab-nav-inner,.courtyard-page .category-nav-inner { gap: 6px; }
  .courtyard-page .tab-btn,.courtyard-page .nav-pill { min-height: 34px; padding: 7px 10px; font-size: 12px; }
  .courtyard-page .family-tabs .tab-btn small { display: none; }
  .courtyard-page .container,.courtyard-page .student-main { padding-top: 8px; }
  .courtyard-quick { flex-direction: column; align-items: stretch; gap: 7px; padding: 8px 10px; margin-bottom: 12px; }
  .courtyard-quick-label { font-size: 11px; gap: 6px; }
  .courtyard-quick-mascot { width: 22px; height: 22px; }
  .courtyard-quick-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .courtyard-quick-links a { min-height: 36px; font-size: 13px; padding: 7px 10px; }
  .courtyard-page .grid,.courtyard-page .grid.tile-grid,.courtyard-page .student-grid,.courtyard-page .math-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .courtyard-page .card,.courtyard-page .card.tile-card,.courtyard-page .card.locked-card { min-height: 126px; padding: 13px 12px; gap: 8px; }
  .courtyard-page .card .card-icon { width: 32px; height: 32px; padding: 5px; border-radius: 9px; }
  .courtyard-page .card-icon .storybook-icon { width: 22px; height: 22px; }
  .courtyard-page .card .card-title,.courtyard-page .card.tile-card .card-title,.courtyard-page.portal-family .card .card-title .zh { font-size: 16px; }
  .courtyard-page .card .card-desc,.courtyard-page .card.tile-card .card-desc { font-size: 11px; line-height: 1.5; }
  .courtyard-page .student-card,.courtyard-page .math-section .student-card { min-height: 92px; padding: 14px 10px; gap: 9px; }
  .courtyard-page .card-picture { width: 34px; height: 34px; padding: 2px; flex-shrink: 0; }
  .courtyard-page .card-picture svg { width: 30px; height: 30px; }
  .courtyard-page .card-label strong,.courtyard-page .math-grid .card-label strong { font-size: 17px; }
  .courtyard-page .card-label small { font-size: 9px; }
  .courtyard-page .section-title,.courtyard-page .section-heading { font-size: 18px; gap: 6px; padding: 4px 0; }
  .courtyard-page .section-heading h2 { font-size: 20px; }
  .courtyard-page .section-title small { font-size: 9px; }
  .courtyard-page .container > section { margin-top: 14px; }
}
@media(max-width:360px) { .courtyard-room-nav { gap: 6px; } .courtyard-brand strong { letter-spacing: 1px; font-size: 16px; } .courtyard-room-nav a { font-size: 10px; } }
/* One navigation frame: a clear Home action and one contained character. */
.courtyard-page .site-header,.courtyard-page .student-header {
 display: flex; align-items: center; justify-content: space-between; gap: 24px;
 min-height: 110px; margin: 12px auto 8px; padding: 10px 28px;
}
.courtyard-home {
 position: relative; z-index: 6; display: inline-flex; align-items: center; gap: 12px;
 flex-shrink: 0; min-height: 56px; padding: 10px 18px; border: 1px solid var(--room);
 border-radius: 12px; color: #fffdf5; background: var(--room); text-decoration: none;
 box-shadow: 0 3px 0 #6e573023; font-size: 18px; font-weight: 600;
}
.courtyard-home:hover { filter: brightness(.92); }
.courtyard-home small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; letter-spacing: .3px; }
.courtyard-home-arrow { font-size: 26px; line-height: 1; }
.courtyard-identity { position: relative; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.courtyard-page .courtyard-identity .portal-art {
 position: relative; inset: auto; flex: 0 0 100px; width: 100px; height: 90px;
 margin: 0; overflow: hidden; border-radius: 0; background: none;
}
.courtyard-page .courtyard-identity .family-art { flex-basis: 124px; width: 124px; }
.courtyard-page .courtyard-identity .student-art,.courtyard-page .courtyard-identity .sharing-art { flex-basis: 85px; width: 85px; }
.courtyard-page .courtyard-identity .portal-art svg,.courtyard-page .courtyard-identity .portal-art img { display: block; width: 100%; height: 100%; overflow: hidden; animation: none; transform: none; }
.courtyard-page .courtyard-hero-copy { min-width: 0; }
.courtyard-page .courtyard-hero-copy h1 { font-size: 30px; letter-spacing: 3px; }
.courtyard-page .courtyard-hero-copy h1 small { margin-left: 12px; }
.courtyard-page .courtyard-hero-copy p { margin-top: 7px; }
.courtyard-page .courtyard-scenery { right: 0; width: 140px; opacity: .1; }
@media(max-width:1000px) {
 .courtyard-page .courtyard-hero-copy h1 small { display: block; margin: 4px 0 0; }
 .courtyard-page .site-header,.courtyard-page .student-header { gap: 16px; padding: 10px 20px; }
}
@media(max-width:760px) {
 .courtyard-page .site-header,.courtyard-page .student-header { gap: 12px; min-height: 108px; padding: 10px 12px; margin-top: 10px; }
 .courtyard-home { min-height: 54px; padding: 10px; gap: 6px; font-size: 14px; border-radius: 10px; }
 .courtyard-home small { font-size: 8px; letter-spacing: 0; }
 .courtyard-home-arrow { font-size: 20px; }
 .courtyard-identity { gap: 8px; justify-content: flex-start; flex: 0 1 auto; }
 .courtyard-page .courtyard-identity .portal-art { flex-basis: 58px; width: 58px; height: 72px; }
 .courtyard-page .courtyard-identity .family-art { flex-basis: 68px; width: 68px; }
 .courtyard-page .courtyard-identity .student-art,.courtyard-page .courtyard-identity .sharing-art { flex-basis: 52px; width: 52px; }
 .courtyard-page .courtyard-hero-copy h1 { font-size: 23px; letter-spacing: 1px; }
 .courtyard-page .courtyard-hero-copy h1 small { font-size: 9px; }
 .courtyard-page .courtyard-hero-copy p { font-size: 11px; line-height: 1.5; margin-top: 5px; }
}
@media(max-width:360px) {
 .courtyard-page .site-header,.courtyard-page .student-header { gap: 8px; padding-inline: 10px; }
 .courtyard-home { padding: 9px 7px; font-size: 13px; }
 .courtyard-page .courtyard-identity .portal-art,.courtyard-page .courtyard-identity .family-art,.courtyard-page .courtyard-identity .student-art,.courtyard-page .courtyard-identity .sharing-art { flex-basis: 44px; width: 44px; }
 .courtyard-page .courtyard-hero-copy h1 { font-size: 21px; }
}
/* Readable portal edition: consistent KaiTi/WenKai typography and opaque surfaces. */
.courtyard-page {
  --room: #87442f;
  --ink: #293b32;
  --muted-ink: #526056;
  --text: var(--ink);
  --text-muted: var(--muted-ink);
  --book-ink: var(--ink);
  color: var(--ink);
  font-family: var(--site-font);
  background: #f5f2e9;
}
.courtyard-page.portal-teacher { --room: #315c47; --room-soft: #e7eee5; --room-line: #b5c7b4; }
.courtyard-page.student-school { --room: #8c435e; }
.courtyard-page.portal-resources { --room: #80551f; }

/* Discard inherited width/right/bottom values from the older paper ornaments.
   A single header surface also avoids the apparent extra frame behind Home. */
.storybook-page.courtyard-page .site-header::before,
.storybook-page.courtyard-page .site-header::after,
.storybook-page.courtyard-page .student-header::before,
.storybook-page.courtyard-page .student-header::after { content: none; display: none; }
.courtyard-page .site-header, .courtyard-page .student-header {
  min-height: 132px; margin: 20px auto 12px; padding: 18px 26px;
  border: 1px solid #c9d0c1; border-top: 4px solid var(--room);
  border-radius: 18px; box-shadow: 0 6px 24px #293b3209;
}
.courtyard-page .courtyard-home {
  font-family: var(--site-font); font-size: 17px; font-weight: 600;
  min-height: 56px; padding: 12px 18px; border-radius: 12px;
  color: #fff; box-shadow: none;
}
.courtyard-page .courtyard-home small { font-size: 11px; line-height: 1.4; }
.courtyard-page .courtyard-hero-copy h1 { color: var(--ink); font-size: 32px; }
.courtyard-page .courtyard-hero-copy h1 small {
  color: var(--room); font-family: var(--site-font); font-size: 13px;
}
.courtyard-page .courtyard-hero-copy p { color: var(--muted-ink); font-size: 15px; }
.courtyard-page .courtyard-scenery { opacity: .16; width: 220px; }
.courtyard-page .sticky-top { background: #f5f2e9f5; }
/* Compact category tabs: pale category colors at rest, solid when selected. */
.courtyard-page .tab-nav, .courtyard-page .category-nav {
  background: #f5f2e9f5; padding: 6px 0 10px;
}
.courtyard-page .tab-nav-inner, .courtyard-page .category-nav-inner {
  width: calc(100% - 64px); max-width: 1240px; gap: 7px;
}
.courtyard-page :is(.tab-btn, .nav-pill, .subject-tab-btn) {
  --tab-ink: #315c47; --tab-soft: #e6eee5; --tab-line: #a6bea9;
}
.courtyard-page :is([data-target="tool-awards"], [href="#family-news"]) {
  --tab-ink: #795219; --tab-soft: #f6ead0; --tab-line: #cdb37c;
}
.courtyard-page :is([data-target="tool-units"], [href="#family-chinese"], [data-subject="cn"]) {
  --tab-ink: #365f84; --tab-soft: #e3edf6; --tab-line: #a1bad0;
}
.courtyard-page :is([data-target="tool-games"], [data-target="games"], [href="#family-games"], [data-subject="sci"]) {
  --tab-ink: #6b467f; --tab-soft: #eee5f3; --tab-line: #bda4ce;
}
.courtyard-page :is([data-target="tool-groups"], [href="#family-songs"]) {
  --tab-ink: #8a4930; --tab-soft: #f7e7dc; --tab-line: #d0a28d;
}
.courtyard-page :is([data-target="tool-students"], [href="#family-math"], [data-subject="math"]) {
  --tab-ink: #28686c; --tab-soft: #dfeeed; --tab-line: #94bdbb;
}
.courtyard-page :is([data-target="tool-favorites"], [data-target="worksheets"]) {
  --tab-ink: #8a455e; --tab-soft: #f5e4eb; --tab-line: #cba0b2;
}
.courtyard-page .tab-btn, .courtyard-page .nav-pill, .courtyard-page .subject-tab-btn {
  font-family: var(--site-font); font-size: 14px; font-weight: 500; line-height: 1.3;
  min-height: 32px; padding: 6px 11px; gap: 6px; color: var(--tab-ink);
  background: var(--tab-soft); border-color: var(--tab-line); border-radius: 9px;
}
.courtyard-page .tab-btn span, .courtyard-page .tab-btn small { font-family: var(--site-font); }
.courtyard-page .tab-btn small { font-size: 11px; }
.courtyard-page .tab-btn svg, .courtyard-page .nav-pill i { width: 14px; height: 14px; font-size: 12px; }
.courtyard-page.portal-teacher .tab-btn .category-icon { width: 16px; height: 16px; flex: none; }
.courtyard-page .tab-btn:hover, .courtyard-page .nav-pill:hover,
.courtyard-page .subject-tab-btn:hover { border-color: var(--tab-ink); background: var(--tab-soft); }
.courtyard-page .tab-btn.active, .courtyard-page .nav-pill.active,
.courtyard-page .subject-tab-btn.active { color: #fff; background: var(--tab-ink); border-color: var(--tab-ink); }
.courtyard-page .container, .courtyard-page .student-main { padding-top: 12px; }
.courtyard-page .courtyard-quick { padding: 14px; gap: 18px; border-radius: 14px; margin-bottom: 28px; }
.courtyard-page .courtyard-quick-label { font-size: 14px; font-weight: 600; }
.courtyard-page .courtyard-quick-links a {
  min-height: 46px; font-size: 16px; color: var(--ink); padding: 11px 14px;
  border-color: #cbd5c5; border-radius: 9px; box-shadow: none;
}
.courtyard-page .section-title, .courtyard-page .section-heading {
  color: var(--ink); font-size: 25px; margin-bottom: 18px; padding: 8px 0 12px;
  border-bottom: 1px solid #cbd2c4; gap: 12px;
}
.courtyard-page .section-title .section-heading { margin: 0; padding: 0; border: 0; font-size: inherit; }
.courtyard-page .section-title small, .courtyard-page .section-heading small,
.courtyard-page .subject-count { color: var(--muted-ink); font-family: var(--site-font); font-size: 13px; }
.courtyard-page .container > section { margin-bottom: 36px; scroll-margin-top: 150px; }
.courtyard-page .grid, .courtyard-page .grid.tile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.courtyard-page .card, .courtyard-page .card.tile-card, .courtyard-page .card.locked-card {
  min-height: 168px; padding: 24px; gap: 16px; border: 1px solid #c7d0c1;
  border-radius: 14px; background: #fffdf8; box-shadow: 0 3px 12px #293b3207;
  grid-template-columns: 44px minmax(0,1fr); align-content: start;
}
.courtyard-page.portal-teacher .card { border-left: 4px solid var(--room); }
.courtyard-page .card:nth-child(3n+2), .courtyard-page .card:nth-child(3n) { background: #fffdf8; }
.courtyard-page .card .card-icon, .courtyard-page .card.tile-card .card-icon {
  background: var(--room-soft); border-radius: 12px; width: 44px; height: 44px; padding: 8px;
}
.courtyard-page .card .card-title, .courtyard-page .card.tile-card .card-title,
.courtyard-page.portal-family .card .card-title .zh {
  color: var(--ink); font-size: 21px; font-weight: 600; line-height: 1.45;
}
.courtyard-page .card-title .sub-title { color: var(--room); font-family: var(--site-font); font-size: 13px; line-height: 1.6; margin-top: 5px; }
.courtyard-page.portal-family .card .card-title { color: var(--muted-ink); font-size: 13px; font-family: var(--site-font); }
.courtyard-page .card .card-desc, .courtyard-page .card.tile-card .card-desc,
.courtyard-page .unit-desc {
  display: block; -webkit-line-clamp: unset; overflow: visible;
  color: var(--muted-ink); font-family: var(--site-font); font-size: 15px; line-height: 1.8;
}
.courtyard-page .card:has(.fav-pin), .courtyard-page .card.locked-card { padding-top: 44px; min-height: 188px; }
.courtyard-page .card .fav-pin, .courtyard-page .card .lock-badge {
  width: 30px; height: 30px; color: #785a27; border-color: #bca777; background: #fffaf0;
}
.courtyard-page .card.locked-card .fav-pin { right: 46px; }
.courtyard-page .student-card, .courtyard-page .math-section .student-card {
  min-height: 122px; padding: 20px 16px; border-color: #c7d0c1; border-radius: 16px;
  box-shadow: 0 3px 12px #293b3207;
}
.courtyard-page .card-label strong, .courtyard-page .math-grid .card-label strong { color: var(--ink); font-size: 22px; }
.courtyard-page .card-label small { color: var(--muted-ink); font-family: var(--site-font); font-size: 12px; line-height: 1.6; }
.courtyard-page .card-arrow { color: var(--room); }
.courtyard-page .card:hover, .courtyard-page .student-card:hover {
  transform: translateY(-2px); box-shadow: 0 8px 20px #293b3212; border-color: var(--room);
}
.courtyard-page .portal-footer, .courtyard-page .student-footer { color: var(--muted-ink); font-size: 12px; }
@media(max-width:1000px) {
  .courtyard-page .grid, .courtyard-page .grid.tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .courtyard-page .student-grid, .courtyard-page .math-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .courtyard-page .site-header, .courtyard-page .student-header {
    flex-direction: column; align-items: flex-start; gap: 18px; padding: 18px;
    margin-top: 12px; width: calc(100% - 28px);
  }
  .courtyard-page .courtyard-home { min-height: 44px; padding: 9px 13px; gap: 9px; font-size: 14px; }
  .courtyard-page .courtyard-home small { display: none; }
  .courtyard-page .courtyard-identity { width: 100%; gap: 14px; }
  .courtyard-page .courtyard-hero-copy h1 { font-size: 28px; }
  .courtyard-page .courtyard-hero-copy h1 small { font-size: 12px; }
  .courtyard-page .courtyard-hero-copy p { font-size: 14px; }
  .courtyard-page .tab-nav-inner, .courtyard-page .category-nav-inner { width: calc(100% - 32px); gap: 6px; }
  .courtyard-page .tab-btn, .courtyard-page .nav-pill { font-size: 14px; padding: 6px 10px; }
  .courtyard-page .courtyard-quick { padding: 12px; gap: 10px; margin-bottom: 20px; }
  .courtyard-page .courtyard-quick-label { font-size: 14px; }
  .courtyard-page .courtyard-quick-links { gap: 8px; }
  .courtyard-page .courtyard-quick-links a { font-size: 15px; }
  .courtyard-page .section-title, .courtyard-page .section-heading { font-size: 23px; flex-wrap: wrap; }
  .courtyard-page .card, .courtyard-page .card.tile-card, .courtyard-page .card.locked-card { min-height: 160px; padding: 20px; gap: 12px; }
  .courtyard-page .card:has(.fav-pin), .courtyard-page .card.locked-card { padding-top: 44px; }
  .courtyard-page .student-card, .courtyard-page .math-section .student-card { min-height: 128px; flex-direction: column; align-items: flex-start; padding: 16px; }
  .courtyard-page .card-label strong, .courtyard-page .math-grid .card-label strong { font-size: 21px; }
  .courtyard-page .card-arrow { position: absolute; top: 18px; right: 14px; }
}
@media(max-width:540px) {
  .courtyard-page .grid, .courtyard-page .grid.tile-grid,
  .courtyard-page.portal-family #family-news .grid { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion:reduce) {
  .courtyard-page .card:hover, .courtyard-page .student-card:hover { transform: none; }
}

/* Activity icons represent the actual task and stay consistent across portals. */
.courtyard-page .card .card-icon[data-icon],
.courtyard-page .card.tile-card .card-icon[data-icon],
.courtyard-page .card-picture[data-icon] {
  color: var(--function-ink, #315c47); background: var(--function-paper, #e7eee5);
  display: grid; place-items: center; flex-shrink: 0;
  width: 52px; height: 52px; padding: 10px; border-radius: 13px;
}
.courtyard-page [data-icon-tone="amber"] { --function-ink: #80551f; --function-paper: #f6ead0; }
.courtyard-page [data-icon-tone="rose"] { --function-ink: #8a455e; --function-paper: #f5e4eb; }
.courtyard-page [data-icon-tone="blue"] { --function-ink: #365f84; --function-paper: #e3edf6; }
.courtyard-page [data-icon-tone="teal"] { --function-ink: #28686c; --function-paper: #dfeeed; }
.courtyard-page .portal-function-icon { display: block; width: 32px; height: 32px; }
.courtyard-page .card, .courtyard-page .card.tile-card, .courtyard-page .card.locked-card { grid-template-columns: 52px minmax(0,1fr); }
.courtyard-page .card-picture[data-icon] { width: 44px; height: 44px; padding: 6px; }

/* The game shelf can be browsed by learning goal or searched by name/play style. */
.courtyard-page .game-discovery { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.courtyard-page .game-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.courtyard-page .game-filter {
  --filter-ink: #4d5760; --filter-paper: #e9ecec; --filter-line: #b8c2c2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px;
  padding: 6px 12px; border: 1px solid var(--filter-line); border-radius: 9px;
  color: var(--filter-ink); background: var(--filter-paper);
  font: 500 15px/1.3 var(--site-font); cursor: pointer;
}
.courtyard-page .game-filter[data-game-filter="literacy"] { --filter-ink: #315c47; --filter-paper: #e7eee5; --filter-line: #a6bea9; }
.courtyard-page .game-filter[data-game-filter="numbers"] { --filter-ink: #365f84; --filter-paper: #e3edf6; --filter-line: #a1bad0; }
.courtyard-page .game-filter[data-game-filter="arithmetic"] { --filter-ink: #6b467f; --filter-paper: #eee5f3; --filter-line: #bda4ce; }
.courtyard-page .game-filter[data-game-filter="calendar"] { --filter-ink: #80551f; --filter-paper: #f6ead0; --filter-line: #cdb37c; }
.courtyard-page .game-filter.active { background: var(--filter-ink); color: #fff; border-color: var(--filter-ink); }
.courtyard-page .game-filter:hover { border-color: var(--filter-ink); }
.courtyard-page .game-filter span { font-size: 12px; font-variant-numeric: tabular-nums; }
.courtyard-page .game-search-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.courtyard-page .game-search { display: flex; align-items: center; gap: 9px; width: min(100%,460px); padding: 9px 12px; border: 1px solid #b5c7b4; border-radius: 10px; background: #fffdf8; }
.courtyard-page .game-search svg { width: 18px; height: 18px; flex: none; color: #526056; }
.courtyard-page .game-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.courtyard-page .game-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: #293b32; font: 15px/1.5 var(--site-font); }
.courtyard-page .game-search input::placeholder { color: #526056; opacity: 1; }
.courtyard-page .game-search:focus-within { outline: 2px solid #315c47; outline-offset: 2px; }
.courtyard-page .game-result-count { margin: 0; font-size: 14px; color: #526056; }
.courtyard-page .game-empty { padding: 24px; color: #526056; border: 1px dashed #b5c7b4; border-radius: 12px; }
.courtyard-page .game-empty button { margin-left: 10px; border: 0; background: none; color: #315c47; font: inherit; text-decoration: underline; cursor: pointer; }
.courtyard-page #game-grid > [hidden], .courtyard-page .game-discovery[hidden], .courtyard-page .game-empty[hidden] { display: none; }
@media(max-width:760px) {
  .courtyard-page .game-filter { font-size: 14px; padding: 6px 10px; }
  .courtyard-page .game-search-row { gap: 8px; }
}
