:root {
    --bg: #fff8f6;
    --band: #fff1ed;
    --surface: #fffefd;
    --cream: #fff6e8;
    --rose: #e9a5a9;
    --rose-soft: #f8dddd;
    --rose-deep: #9b4356;
    --cta-bg: #f1c9cf;
    --cta-hover: #e8b7c0;
    --cta-border: #dca7b2;
    --cta-text: #543241;
    --plum: #543241;
    --sage: #6f8f7a;
    --ink: #2e2529;
    --muted: #6f6268;
    --line: #ead6d4;
    --shadow: 0 18px 48px rgba(95, 62, 68, 0.12);
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 0;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
    color: var(--ink);
    background: var(--bg);
    font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--rose-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--plum);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--plum);
    line-height: 1.25;
    letter-spacing: 0;
}

h1 {
    margin-bottom: 14px;
    font-size: 2.15rem;
}

h2 {
    margin-bottom: 14px;
    font-size: 1.65rem;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

p {
    margin-bottom: 0;
}

.skip-link {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 10px 14px;
    color: #fff;
    background: var(--plum);
    border-radius: 6px;
    transform: translateY(-140%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: none;
    background: rgba(255, 248, 246, 0.94);
    border-bottom: 1px solid rgba(234, 214, 212, 0.86);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--plum);
    font-weight: 700;
    text-decoration: none;
}

.top-nav {
    display: none;
}

.section-shell {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding-inline: 20px;
}

.hero {
    padding-top: 28px;
    padding-bottom: 30px;
}

.hero-surface {
    display: grid;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-profile {
    padding: 24px 18px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    background: linear-gradient(145deg, var(--surface), var(--cream));
}

.hero-intro {
    display: grid;
    justify-items: start;
    text-align: left;
}

.hero-intro h1 {
    margin-bottom: 8px;
    font-size: clamp(1.6rem, 7.5vw, 2.2rem);
    white-space: nowrap;
}

.doctor-photo {
    width: clamp(92px, 27vw, 124px);
    aspect-ratio: 1;
    height: auto;
    border: 5px solid var(--surface);
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker,
.card-label,
.info-label {
    margin-bottom: 8px;
    color: var(--sage);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
}

.hero-intro .eyebrow {
    margin-bottom: 5px;
}

.hero-lead {
    max-width: 28rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.booking-panel {
    min-width: 0;
    padding: 22px 18px;
    border-top: 1px solid var(--line);
}

.hero-actions,
.wide-action {
    margin-top: 22px;
    display: grid;
    gap: 10px;
}

.clinic-heading {
    margin-bottom: 18px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.clinic-heading .card-label {
    margin-bottom: 5px;
}

.clinic-heading h2 {
    margin-bottom: 0;
    font-size: 1.4rem;
}

.hospital-logo {
    width: 104px;
    height: auto;
    flex: 0 0 auto;
}

.clinic-facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.clinic-facts div {
    min-width: 0;
    padding-left: 11px;
    border-left: 3px solid var(--rose-soft);
}

.clinic-facts .clinic-location {
    grid-column: 1 / -1;
}

.clinic-facts dt {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.8rem;
}

.clinic-facts dd {
    margin: 0;
    color: var(--plum);
    font-weight: 700;
    line-height: 1.5;
}

.clinic-facts dd a {
    margin-left: 5px;
    white-space: nowrap;
    font-size: 0.88rem;
}

.hero-actions {
    margin-top: 20px;
}

.hero-actions .button {
    width: 100%;
}

.quick-booking {
    width: 100%;
    min-width: 0;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.quick-booking[hidden] {
    display: none;
}

.quick-booking-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.quick-booking-heading {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    align-items: baseline;
    justify-content: space-between;
}

.quick-booking-heading h3 {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.quick-booking-heading p,
.quick-booking-note {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.direct-date-button {
    min-width: 0;
    min-height: 62px;
    padding: 9px 6px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--cta-text);
    background: var(--surface);
    border: 1px solid var(--cta-border);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(155, 67, 86, 0.08);
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.direct-date-button:hover {
    color: var(--cta-text);
    background: var(--cream);
    box-shadow: 0 10px 22px rgba(155, 67, 86, 0.14);
    transform: translateY(-1px);
}

.direct-date-button:focus-visible {
    outline: 3px solid var(--sage);
    outline-offset: 3px;
}

.direct-date-label {
    white-space: nowrap;
}

.direct-date-status {
    color: var(--rose-deep);
    font-size: 0.72rem;
    font-weight: 700;
}

.direct-date-button.is-unavailable {
    color: var(--muted);
    background: #f1eceb;
    border-color: var(--line);
    box-shadow: none;
    cursor: not-allowed;
}

.direct-date-button.is-unavailable .direct-date-status {
    color: var(--rose-deep);
}

.quick-booking-note {
    margin-top: 10px;
}

.button {
    min-height: 48px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--plum);
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.button-primary {
    color: var(--cta-text);
    background: var(--cta-bg);
    border-color: var(--cta-border);
    box-shadow: 0 10px 22px rgba(155, 67, 86, 0.14);
}

.button-primary:hover {
    color: var(--cta-text);
    background: var(--cta-hover);
}

.button-secondary {
    background: var(--surface);
    border-color: var(--line);
}

.appointment-dialog-open {
    overflow: hidden;
}

.appointment-dialog {
    width: min(calc(100% - 32px), 520px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    color: var(--ink);
    background: transparent;
    border: 0;
}

.appointment-dialog:not([open]) {
    display: none;
}

.appointment-dialog::backdrop {
    background: rgba(46, 37, 41, 0.64);
    backdrop-filter: blur(3px);
}

.appointment-dialog-panel {
    position: relative;
    padding: 26px 20px 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(46, 37, 41, 0.3);
    text-align: center;
}

.appointment-dialog-panel h2 {
    margin-bottom: 8px;
    padding-inline: 28px;
}

.appointment-dialog-panel > p {
    color: var(--muted);
}

.appointment-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.appointment-dialog-close:hover {
    color: var(--plum);
    background: var(--bg);
}

.appointment-guide-figure {
    width: min(100%, 420px);
    margin: 22px auto 24px;
}

.appointment-guide-callout {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8a3f00;
    font-weight: 800;
    line-height: 1.25;
}

.appointment-guide-arrow {
    position: relative;
    width: 3px;
    height: 14px;
    margin-top: 5px;
    background: #f2a900;
    border-radius: 999px;
}

.appointment-guide-arrow::after {
    position: absolute;
    right: 50%;
    bottom: -1px;
    width: 9px;
    height: 9px;
    content: "";
    border-right: 3px solid #f2a900;
    border-bottom: 3px solid #f2a900;
    transform: translateX(50%) rotate(45deg);
}

.appointment-guide-image {
    position: relative;
    margin: 16px 4px 0;
}

.appointment-guide-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.appointment-afternoon-highlight {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 34.12%;
    width: 31.7%;
    border: 3px solid #f2a900;
    border-radius: 5px;
    box-shadow: 0 0 14px rgba(242, 169, 0, 0.72);
    pointer-events: none;
}

.appointment-dialog-actions {
    display: grid;
    gap: 10px;
}

.appointment-dialog-actions .button {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    cursor: pointer;
}

.appointment-dialog :focus-visible {
    outline: 3px solid var(--sage);
    outline-offset: 3px;
}

.content-section {
    padding-block: 44px;
}

.clinic-band,
.contact-section {
    background: var(--band);
    border-block: 1px solid rgba(234, 214, 212, 0.72);
}

.split-section {
    display: grid;
    gap: 24px;
}

.split-section p,
.section-heading p {
    color: var(--muted);
}

.profile-card-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.credential-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
}

.credential-list li,
.legacy-card {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(95, 62, 68, 0.06);
}

.legacy-card {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    justify-content: space-between;
}

.legacy-card a {
    font-weight: 700;
}

.section-heading {
    margin-bottom: 22px;
}

.info-grid,
.service-grid,
.contact-cards {
    display: grid;
    gap: 12px;
}

.info-card,
.service-card,
.contact-card {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(95, 62, 68, 0.08);
}

.info-card strong,
.contact-card strong {
    display: block;
    color: var(--plum);
    font-size: 1.06rem;
    line-height: 1.45;
}

.info-card p,
.service-card p,
.contact-card p {
    margin-top: 8px;
    color: var(--muted);
}

.service-card h3 {
    font-size: 1.16rem;
}

.contact-layout {
    display: grid;
    gap: 16px;
}

.map-panel {
    min-height: 260px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.map-panel iframe {
    width: 100%;
    height: 300px;
    display: block;
    border: 0;
}

.site-footer {
    padding: 28px 20px;
    color: var(--muted);
    text-align: center;
    background: var(--surface);
}

.mobile-sticky-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(88px, 0.45fr) 1fr;
    gap: 10px;
    background: rgba(255, 248, 246, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 28px rgba(95, 62, 68, 0.12);
    backdrop-filter: blur(16px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 12px));
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.mobile-sticky-cta.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
}

.mobile-sticky-cta a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
}

.sticky-secondary {
    color: var(--plum);
    background: var(--surface);
    border: 1px solid var(--line);
}

.sticky-primary {
    color: var(--cta-text);
    background: var(--cta-bg);
    border: 1px solid var(--cta-border);
}

@media (min-width: 680px) {
    body {
        padding-bottom: 0;
        font-size: 18px;
    }

    h1 {
        font-size: 2.55rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    .site-header {
        display: block;
    }

    .header-inner {
        justify-content: space-between;
        padding-inline: 28px;
    }

    .top-nav {
        display: flex;
        gap: 18px;
        align-items: center;
    }

    .top-nav a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        color: var(--muted);
        font-size: 0.94rem;
        font-weight: 700;
        text-decoration: none;
    }

    .top-nav a:hover {
        color: var(--rose-deep);
    }

    .section-shell {
        padding-inline: 28px;
    }

    .hero {
        padding-top: 46px;
        padding-bottom: 48px;
    }

    .hero-profile {
        padding: 28px;
        grid-template-columns: 152px minmax(0, 1fr);
        gap: 24px;
    }

    .doctor-photo {
        width: 152px;
    }

    .booking-panel {
        padding: 28px;
    }

    .clinic-heading h2 {
        font-size: 1.65rem;
    }

    .hospital-logo {
        width: 128px;
    }

    .clinic-facts {
        grid-template-columns: 0.8fr 0.8fr 1.4fr;
    }

    .clinic-facts .clinic-location {
        grid-column: auto;
    }

    .hero-actions {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .wide-action {
        display: flex;
        flex-wrap: wrap;
    }

    .quick-booking-dates {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .wide-action .button {
        min-width: 174px;
    }

    .split-section,
    .info-grid,
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .split-section > div {
        grid-column: span 1;
    }

    .split-section > .profile-card-list {
        grid-column: span 2;
    }

    .credential-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-heading {
        max-width: 720px;
    }

    .contact-layout {
        grid-template-columns: 1.18fr 0.82fr;
        align-items: stretch;
    }

    .map-panel iframe {
        height: 100%;
        min-height: 386px;
    }

    .site-footer {
        padding-bottom: 28px;
    }

    .mobile-sticky-cta {
        display: none;
    }
}

@media (min-width: 980px) {
    h1 {
        font-size: 3rem;
    }

    .hero {
        padding-top: 54px;
        padding-bottom: 56px;
    }

    .hero-surface {
        grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.45fr);
    }

    .hero-profile {
        padding: 34px 30px;
        grid-template-columns: 1fr;
        justify-items: center;
        align-content: center;
        text-align: center;
    }

    .hero-intro {
        justify-items: center;
        text-align: center;
    }

    .hero-intro h1 {
        font-size: clamp(2.25rem, 3vw, 2.6rem);
    }

    .doctor-photo {
        width: 174px;
    }

    .booking-panel {
        padding: 32px;
        border-top: 0;
        border-left: 1px solid var(--line);
    }

    .content-section {
        padding-block: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
