:root {
    --brand: #ff5722;
    --brand-deep: #d84315;
    --ink: #262b31;
    --muted: #687179;
    --paper: #f2f3f1;
    --surface: #ffffff;
    --surface-soft: #f7f8f6;
    --line: #e2e5e1;
    --navy: #192438;
    --teal: #287266;
    --teal-soft: #edf7f3;
    --warm-soft: #fff5ec;
    --shadow: 0 22px 62px rgba(38, 45, 50, .09);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.9 "Noto Sans TC", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.legal-header {
    position: relative;
    min-height: 330px;
    padding: 27px 20px 84px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 80% 5%, rgba(65, 101, 124, .16), transparent 31%),
        radial-gradient(circle at 12% 115%, rgba(57, 116, 98, .12), transparent 34%),
        linear-gradient(135deg, #fafcfb 0%, #edf2f2 58%, #e4ebed 100%);
    box-shadow: inset 0 -1px 0 rgba(67, 84, 94, .12);
}
.legal-header::before {
    content: "";
    position: absolute;
    top: -250px;
    right: -100px;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(65, 101, 124, .17);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(65, 101, 124, .04), 0 0 0 140px rgba(57, 116, 98, .025);
    pointer-events: none;
}
.legal-header::after {
    position: absolute;
    right: 3vw;
    bottom: -54px;
    color: rgba(51, 65, 74, .045);
    font: 900 clamp(100px, 15vw, 205px)/1 "Poppins", sans-serif;
    letter-spacing: -.08em;
    pointer-events: none;
}
.terms-page .legal-header::after { content: "TERMS"; }
.privacy-page .legal-header::after { content: "PRIVACY"; }
.header-circle {
    position: absolute;
    top: 20px;
    z-index: 8;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(75, 87, 94, .15);
    border-radius: 50%;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 8px 24px rgba(44, 57, 65, .07);
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: border-color .2s, background .2s, transform .2s;
}
.header-circle:hover { border-color: rgba(48, 99, 113, .38); background: #fff; color: #315f74; }
.header-circle:active { transform: scale(.94); }
.back-btn { left: 20px; font: 28px/1 sans-serif; }
.home-btn { right: 20px; font: 21px/1 sans-serif; }
.header-logo {
    position: relative;
    z-index: 5;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 34px;
    text-decoration: none;
}
.logo-title { color: var(--brand); font: 900 25px/1 "Poppins", sans-serif; letter-spacing: -.04em; }
.logo-subtitle { margin-top: 5px; color: #817970; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.legal-hero { position: relative; z-index: 3; max-width: 790px; margin: 0 auto; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; color: #6f7b80; font: 800 10px "Poppins", sans-serif; letter-spacing: .24em; }
.hero-kicker::before, .hero-kicker::after { content: ""; width: 26px; height: 1px; background: rgba(65, 80, 88, .35); }
.legal-hero h1 { margin: 13px 0 10px; font-size: clamp(39px, 6vw, 62px); font-weight: 900; line-height: 1.12; letter-spacing: -.055em; }
.legal-hero p { max-width: 660px; margin: 0 auto; color: #5f6a70; font-size: 17px; font-weight: 700; line-height: 1.75; }

.legal-main { position: relative; z-index: 4; width: min(100% - 32px, 980px); margin: -50px auto 0; padding-bottom: 48px; }
.legal-shell { overflow: hidden; border: 1px solid rgba(216, 219, 215, .9); border-radius: 28px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow); }
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 18px;
    padding: 17px 30px;
    border-bottom: 1px solid var(--line);
    background: #fafaf8;
    color: #788087;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
}
.legal-body { padding: 36px 42px 42px; }
.legal-intro { max-width: 800px; margin: 0 auto 26px; }
.legal-intro h2 { margin: 0 0 10px; font-size: 27px; line-height: 1.35; letter-spacing: -.035em; }
.legal-intro p { margin: 0; color: #545d63; font-size: 16.5px; line-height: 2; }
.legal-note { display: flex; gap: 15px; margin: 26px 0; padding: 20px 22px; border: 1px solid #f1dfcb; border-radius: 17px; background: var(--warm-soft); color: #724a2f; }
.legal-note.is-green { border-color: #d6e9e1; background: var(--teal-soft); color: #315e53; }
.note-icon { flex: 0 0 auto; display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #fff; font-size: 20px; box-shadow: 0 5px 15px rgba(61, 49, 39, .06); }
.legal-note b { display: block; margin-bottom: 3px; color: inherit; font-size: 15px; }
.legal-note p { margin: 0; font-size: 14px; line-height: 1.85; }

.legal-article { max-width: 800px; margin: 0 auto; }
.legal-section { padding: 34px 0; border-bottom: 1px solid var(--line); }
.legal-section:last-of-type { border-bottom: 0; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 15px; }
.section-index { flex: 0 0 auto; color: var(--brand-deep); font-size: 21px; font-weight: 900; line-height: 1.45; }
.section-title h2 { margin: 0; font-size: 21px; line-height: 1.45; letter-spacing: -.02em; }
.legal-section p { margin: 0 0 14px; color: #505960; font-size: 16px; line-height: 2; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol { margin: 8px 0 16px; padding-left: 24px; color: #505960; }
.legal-section li { margin-bottom: 9px; padding-left: 3px; font-size: 16px; line-height: 1.9; }
.legal-section strong { color: #30373c; }
.inline-link { color: #176c5a; font-weight: 800; text-underline-offset: 3px; }
.data-table-wrap { margin: 17px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; line-height: 1.75; }
.data-table th { background: #f5f6f4; color: #566066; font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.data-table tr:last-child td { border-bottom: 0; }

.legal-contact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; max-width: 800px; margin: 18px auto 0; padding: 24px; border: 1px solid rgba(40, 114, 102, .18); border-radius: 20px; background: linear-gradient(135deg, #f4faf7, #edf6f2); }
.contact-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; background: var(--teal); color: #fff; font-size: 23px; box-shadow: 0 10px 24px rgba(40, 114, 102, .19); }
.contact-copy span { color: var(--teal); font: 900 10px "Poppins", sans-serif; letter-spacing: .15em; }
.contact-copy h2 { margin: 3px 0 4px; font-size: 21px; line-height: 1.4; }
.contact-copy p { margin: 0; color: #5c6d67; font-size: 13px; line-height: 1.75; }
.contact-email { min-width: 210px; padding: 12px 16px; border-radius: 13px; background: #fff; color: var(--teal); box-shadow: 0 8px 20px rgba(40, 89, 75, .08); font: 800 13px "Poppins", sans-serif; text-align: center; text-decoration: none; }

.legal-footer { background: var(--navy); color: #dfe6ef; }
.footer-inner { display: flex; width: min(100% - 40px, 980px); min-height: 142px; align-items: center; justify-content: space-between; gap: 26px; margin: 0 auto; padding: 25px 0; }
.footer-brand { display: flex; flex-direction: column; text-decoration: none; }
.footer-brand strong { color: #fff; font: 900 21px "Poppins", sans-serif; letter-spacing: -.035em; }
.footer-brand span { margin-top: 2px; color: #91a0b4; font-size: 12px; font-weight: 700; }
.footer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 13px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.footer-nav a { padding: 7px 11px; border: 1px solid #334159; border-radius: 999px; color: #d8e0eb; font-size: 12px; font-weight: 800; text-decoration: none; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { border-color: #576a89; background: #222f46; color: #fff; }
.footer-copy { color: #718096; font: 700 11px "Poppins", sans-serif; }

@media (max-width: 760px) {
    html { scroll-padding-top: 72px; }
    body { font-size: 16px; }
    .legal-header { min-height: 316px; padding: 27px 16px 72px; }
    .legal-header::after { right: -7vw; bottom: -24px; font-size: 100px; }
    .header-circle { top: 17px; width: 42px; height: 42px; }
    .back-btn { left: 14px; }
    .home-btn { right: 14px; }
    .header-logo { margin-bottom: 32px; }
    .legal-hero h1 { font-size: 43px; }
    .legal-hero p { max-width: 335px; font-size: 16px; line-height: 1.8; }
    .legal-main { width: min(100% - 20px, 980px); margin-top: -38px; padding-bottom: 30px; }
    .legal-shell { border-radius: 22px; }
    .legal-meta { display: grid; padding: 14px 18px; font-size: 11px; }
    .legal-body { padding: 27px 18px 30px; }
    .legal-intro { margin-bottom: 20px; }
    .legal-intro h2 { font-size: 23px; }
    .legal-intro p { font-size: 16px; line-height: 1.95; }
    .legal-note { gap: 12px; padding: 17px 15px; }
    .note-icon { width: 38px; height: 38px; }
    .legal-section { padding: 29px 0; }
    .section-title { gap: 7px; }
    .section-index, .section-title h2 { font-size: 20px; }
    .legal-section p, .legal-section li { font-size: 16px; line-height: 1.95; }
    .legal-section ul, .legal-section ol { padding-left: 21px; }
    .legal-contact { grid-template-columns: auto minmax(0, 1fr); padding: 19px 16px; }
    .contact-icon { width: 46px; height: 46px; }
    .contact-copy h2 { font-size: 19px; }
    .contact-email { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 50px; display: grid; place-items: center; }
    .footer-inner { min-height: 164px; flex-direction: column; justify-content: center; gap: 15px; padding: 25px 0 22px; text-align: center; }
    .footer-side { align-items: center; gap: 10px; }
    .footer-nav { justify-content: center; }
}

@media (max-width: 390px) {
    .logo-title { font-size: 22px; }
    .logo-subtitle { font-size: 9px; }
    .legal-hero h1 { font-size: 39px; }
}

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