/* Only layout support for the new page structure. The base stylesheet, palette, typography and component appearance are unchanged. */
.hero-photo {
    min-height: 360px;
    overflow: hidden;
    background: var(--color-lilac,#e8def0);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 560px;
    object-fit: cover;
    object-position: center top;
}

.teacher-portrait {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center top;
}

.performance-photo {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.hero-photo img.hero-portrait {
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center top;
}

.teacher-portrait-frame {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    margin-inline: auto;
}

.teacher-story .teacher-portrait-frame .teacher-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    margin: 0;
}

.teacher-story .teacher-portrait-frame .teacher-dizi-photo {
    object-position: 38% center;
}

.teacher-closing-photo {
    display: block;
    height: auto;
    max-height: none;
    object-fit: contain;
}

.instrument-symbol {
    height: 240px;
    display: grid;
    place-items: center;
    font-family: var(--font-display,Georgia,serif);
    font-size: 8rem;
    color: var(--color-ink,#30213f);
    line-height: 1;
}

.video-placeholder {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed var(--color-line,#d9d1d8);
    border-radius: 1rem;
    padding: 1.5rem;
}

.video-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #30213f;
}

.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.anchor-section {
    scroll-margin-top: 2rem;
}

.timeline {
    border-top: 1px solid var(--color-line,#d9d1d8);
}

.timeline-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 18px;
    padding: 22px 4px;
    border-bottom: 1px solid var(--color-line,#d9d1d8);
    align-items: start;
}

.faq-list {
    display: grid;
    gap: 14px;
    max-width: 980px;
    margin: 0;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.faq-item {
    padding: 1.4rem 1.6rem;
    margin-left: 0;
}

.faq-item summary {
    font-size: 1.1rem;
    font-weight: 650;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:after {
    content: '+';
    font-weight: bold;
    font-size: 1.4rem;
}

.faq-item[open] summary:after {
    content: '−';
}

.form-grid {
    display: grid;
    gap: 22px;
}

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

.booking-result {
    border-top: 1px solid var(--color-line,#d9d1d8);
    padding-top: 1.5rem;
}

@media (max-width:680px){
    .hero-photo {
        min-height: 240px;
    }

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

    .instrument-symbol {
        height: 170px;
        font-size: 6rem;
    }

    .timeline-row {
        grid-template-columns: 70px 1fr;
    }
}

/* Layout-only fixes and requested sections. Base palette / fonts / components are unchanged. */

.instrument-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 1rem;
    margin-bottom: 1.25rem;
}

.experience-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.experience-photo-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 1rem;
}

@media (max-width: 600px) {
    .experience-photo-grid { grid-template-columns: 1fr; }
}
.site-header-layout {
    flex-wrap: wrap;
    row-gap: 0;
}

.site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    padding-block: 1.5rem;
    border-top: 1px solid var(--color-line);
}

.site-nav.is-open {
    display: grid;
    gap: .5rem;
}

.site-menu-toggle {
    display: flex;
}

@media (min-width:1500px) {
    .site-header-layout {
        flex-wrap: nowrap;
    }

    .site-nav,
    .site-nav.is-open {
        display: flex;
        order: initial;
        flex-basis: auto;
        padding-block: 0;
        border-top: 0;
        gap: .25rem;
    }

    .site-menu-toggle {
        display: none;
    }
}

.hero-photo {
    height: clamp(420px, 38vw, 560px);
    min-height: 0;
}

.hero-photo img {
    height: 201%;
    max-height: none;
    object-fit: cover;
    object-position: center top;
}

.teacher-portrait {
    object-position: center top;
}

.footer-consult {
    background: var(--color-vermillion,#b73e26);
    color: var(--color-paper,#fffdf7);
    background-color: #d56717;
}

.footer-consult .eyebrow {
    color: var(--color-butter,#f5d77c);
}

.footer-cta {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background: var(--color-butter,#f5d77c);
    color: var(--color-ink,#30213f);
    border: 1px solid var(--color-butter,#f5d77c);
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 700;
}

.footer-cta:hover,
.footer-cta:focus-visible {
    background: var(--color-paper,#fffdf7);
}

.footer-line {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 2px;
    color: #fffdf7;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.line-qr-link {
    display: block;
    width: fit-content;
    margin-top: 22px;
    border-radius: 16px;
}

.line-qr {
    display: block;
    width: min(240px,100%);
    height: auto;
    border: 1px solid var(--color-line,#d9d1d8);
    border-radius: 12px;
}

.experience-layout {
    max-width: 980px;
    margin-inline: auto;
}

.experience-timeline {
    border-left: 2px solid var(--color-line,#d9d1d8);
    padding-left: clamp(24px,3vw,48px);
}

.experience-year {
    position: relative;
    margin-bottom: 44px;
}

.experience-year:before {
    content: '';
    position: absolute;
    left: calc(0px - clamp(24px, 3vw, 48px) - 8px);
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-butter,#f5d77c);
    border: 3px solid var(--color-ink,#30213f);
}

.experience-year-heading {
    font-family: var(--font-display,Georgia,serif);
    font-size: calc(clamp(32px,3vw,42px) + var(--site-h3-adjust));
    line-height: 1.15;
    color: var(--color-vermillion,#b73e26);
    margin-bottom: 12px;
}

.experience-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-event {
    display: flex;
    gap: 8px 24px;
    justify-content: space-between;
    align-items: baseline;
    padding: 13px 0;
    border-bottom: 1px solid var(--color-line,#d9d1d8);
}

.experience-event-title {
    line-height: 1.6;
    flex: 1;
}

.experience-event-role {
    color: var(--color-muted,#6a5b6f);
    font-size: calc(14px + var(--site-small-adjust));
    max-width: 215px;
    text-align: right;
    line-height: 1.5;
}

@media (max-width:760px) {
    .experience-timeline {
        padding-left: 24px;
    }

    .experience-year:before {
        left: -33px;
    }

    .experience-event {
        display: block;
    }

    .experience-event-role {
        display: block;
        max-width: none;
        text-align: left;
        margin-top: 4px;
    }

    .footer-consult {
        padding: 24px;
    }

    .hero-photo {
        height: 400px;
    }
}

@media (min-width:1024px) {
    .footer-grid {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

/* Local font system: 400 and 500 faces, subset to common Traditional Chinese characters (Big5 level 1 + site text).
   Rare characters fall back to system fonts. Full original fonts are kept in 原始素材（勿公開）/fonts. */
@font-face {
    font-family: "Swei Marker Leg";
    src: url("../fonts/SweiMarkerLegCJKtc-Regular-subset.woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Swei Marker Leg";
    src: url("../fonts/SweiMarkerLegCJKtc-Medium-subset.woff") format("woff");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

:root {
    --font-sans: "Swei Marker Leg", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --font-display: var(--font-sans);
    --font-weight-semibold: 500;

    /* Pinegrow VARS：0px 保留原尺寸，可輸入正負增減值。 */
    --site-h1-adjust: 0px;
    --site-h2-adjust: 0px;
    --site-h3-adjust: 0px;
    --site-body-adjust: 0px;
    --site-small-adjust: 8px;
    --site-button-adjust: 0px;
}

html {
    font-synthesis: none;
    line-break: strict;
}

body {
    font-weight: 400;
    font-size: calc(17px + var(--site-body-adjust));
}

p {
    line-height: 1.7;
    overflow-wrap: break-word;
    margin-right: 0px;
}

h1,
h2,
h3,
h4,
h5,
h6,
b,
strong {
    font-weight: 500;
}

.btn,
.btn-line,
.nav-link,
.footer-cta,
.faq-item summary,
.faq-item summary:after {
    font-weight: 500;
}

.display {
    letter-spacing: -.02em;
}

/* 共用字級增減量：維持原本的各裝置字級與比例。 */
h1 {
    --text-5xl: calc(3rem + var(--site-h1-adjust));
    --text-6xl: calc(3.75rem + var(--site-h1-adjust));
    --text-7xl: calc(4.5rem + var(--site-h1-adjust));
}

h2 {
    --text-3xl: calc(1.875rem + var(--site-h2-adjust));
    --text-4xl: calc(2.25rem + var(--site-h2-adjust));
    --text-5xl: calc(3rem + var(--site-h2-adjust));
}

h3 {
    --text-xl: calc(1.25rem + var(--site-h3-adjust));
    --text-2xl: calc(1.5rem + var(--site-h3-adjust));
    --text-3xl: calc(1.875rem + var(--site-h3-adjust));
}

h1.display[class*="clamp"] {
    font-size: calc(clamp(3.6rem, 6.4vw, 6.4rem) + var(--site-h1-adjust));
}

p.text-lg {
    --text-lg: calc(1.125rem + var(--site-body-adjust));
}

.text-sm,
.label,
.nav-link {
    --text-sm: calc(.875rem + var(--site-small-adjust));
    font-size: 15px;
}

.text-xs,
.eyebrow,
.pill {
    --text-xs: calc(.75rem + var(--site-small-adjust));
}

.btn,
.btn-line {
    --text-base: calc(1rem + var(--site-button-adjust));
}

.footer-cta {
    font-size: calc(17px + var(--site-button-adjust));
}

/* Keep the home headline and header legible in narrow phone viewports. */
@media (max-width: 600px) {
    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
    }

    .hero-stats strong {
        font-size: 1.5rem;
        white-space: nowrap;
    }

    .hero-stats span {
        font-size: .75rem;
        line-height: 1.4;
    }

    h1.display[class*="clamp"] {
        font-size: calc(clamp(2.25rem, 9.6vw, 3.6rem) + var(--site-h1-adjust));
        line-height: 1.13;
    }

    .staff h2.display {
        font-size: calc(1.875rem + var(--site-h2-adjust));
        line-height: 1.15;
    }

    header .font-display {
        font-size: 1.15rem;
        white-space: nowrap;
    }

    header .tracking-\[\.2em\] {
        letter-spacing: .07em;
    }

    header .btn {
        padding-inline: .65rem;
        font-size: calc(.875rem + var(--site-button-adjust));
        white-space: nowrap;
    }
}

/* Responsive story layout: image first on small screens, text first in two columns. */
.teacher-story {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}

.teacher-story .teacher-portrait {
    width: 100%;
    max-width: 450px;
    height: auto;
    margin-inline: auto;
    margin-bottom: 0px;
}

@media (min-width: 768px) {
    .teacher-story {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
        gap: clamp(2rem, 5vw, 4rem);
    }

    .teacher-story-text {
        grid-column: 1;
        grid-row: 1;
    }

    .teacher-story .teacher-portrait {
        grid-column: 2;
        grid-row: 1;
    }

    .teacher-story .teacher-portrait-frame {
        grid-column: 2;
        grid-row: 1;
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
        align-self: stretch;
    }
}

/* The FAQ grid uses one explicit, full-width track for every card. */
.faq-item {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.faq-item summary,
.faq-item p {
    text-align: left;
}

/* 手機固定諮詢列：其內容由首頁的 Pinegrow 元件管理。 */
.mobile-consult-bar {
    display: none;
}

@media (max-width: 600px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-consult-bar {
        position: fixed;
        z-index: 50;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--color-paper, #fffdf7);
    }

    .mobile-consult-bar a {
        flex: 1 1 0;
        min-width: 0;
        min-height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 999px;
        color: #fff;
        font-weight: 500;
        text-decoration: none;
    }

    .mobile-consult-line {
        background: #06c755;
    }

    .mobile-consult-book {
        background: var(--color-ink, #30213f);
    }

    .mobile-consult-bar a:focus-visible {
        outline: 3px solid currentColor;
        outline-offset: -5px;
    }

    body:has(.site-nav.is-open) .mobile-consult-bar {
        visibility: hidden;
    }
}

/* 文章清單與單欄閱讀。 */
.article-list-row {
    border-bottom: 1px solid var(--color-line);
}

.article-list-row:first-child {
    border-top: 1px solid var(--color-line);
}

.article-list-row > a {
    display: block;
    position: relative;
    padding: 1.75rem 3rem 1.75rem 0;
    color: inherit;
    text-decoration: none;
}

.article-list-row > a:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: 3px;
}

.article-list-arrow {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
}

.article-reading {
    max-width: 52rem;
}

.article-reading > p:not(.eyebrow) {
    line-height: 1.75;
}

.article-cover { display:block; width:100%; height:auto; margin-top:1.5rem; }
.article-cover[hidden] { display:none; }
.article-body { line-height:1.75; overflow-wrap:break-word; }
.article-body > * + * { margin-top:1.25rem; }
.article-body h2, .article-body h3 { font-family:var(--font-display,Georgia,serif); line-height:1.3; }
.article-body h2 { font-size:1.75rem; }
.article-body h3 { font-size:1.4rem; }
.article-body ul, .article-body ol { padding-left:1.5rem; }
.article-body ul { list-style:disc; }
.article-body ol { list-style:decimal; }
.article-body img { display:block; max-width:100%; height:auto; border-radius:1rem; }

/* 保留頭部與上半身，裁掉下方竹笛。 */
.teacher-story .teacher-portrait {
    aspect-ratio: auto;
    height: auto;
    object-fit: cover;
    object-position: center top;
    padding-top: 0px;
    min-width: 0px;
    align-items: flex-end;
    margin-top: ０;
}

/* 平板保留雙欄，讓文字有足夠空間。 */
@media (min-width: 768px) and (max-width: 1199px) {
    .staff {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }

    .staff h2.display {
        font-size: calc(clamp(1.75rem, 3.2vw, 2.25rem) + var(--site-h2-adjust));
        line-height: 1.2;
    }
}

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

@media (max-width: 600px) {
    .enrol-page { padding-bottom: 0; }
    .enrol-page .mobile-consult-bar { display: none; }
}

#enquiry-form[hidden] { display:none; }
