:root {
  --cream: #f8f4ed;
  --cream-deep: #f0e7da;
  --paper: #fffdf9;
  --latte: #c59c77;
  --latte-dark: #9a6f4d;
  --cocoa: #4f4036;
  --muted: #786b62;
  --line: #e7d9ca;
  --sage: #a9b49c;
  --blush: #dfb8aa;
  --shadow: 0 12px 35px rgba(91, 69, 51, .07);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--cocoa); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.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; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(248, 244, 237, .9); border-bottom: 1px solid rgba(231, 217, 202, .7); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; align-items: center; text-decoration: none; line-height: 1.25; }
.brand picture { display: block; line-height: 0; }
.brand-mark { display: block; width: clamp(205px, 20vw, 270px); height: auto; object-fit: contain; }
.brand-mobile-name { display: none; color: var(--cocoa); font-family: Georgia, "Noto Serif TC", serif; font-size: 1rem; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .05em; }
.brand small { margin-top: 3px; color: var(--muted); font-family: Georgia, serif; font-size: .7rem; letter-spacing: .08em; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { position: relative; color: var(--muted); font-size: .92rem; text-decoration: none; transition: color .2s ease; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 1px; background: var(--latte-dark); transform: scaleX(0); transition: transform .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--latte-dark); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--cocoa); transition: .2s ease; }

.hero { position: relative; padding: 90px 0 0; overflow: hidden; background: radial-gradient(circle at 82% 20%, rgba(223,184,170,.24), transparent 26%), var(--cream); }
.hero-inner { min-height: 500px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 70px; }
.eyebrow { margin: 0 0 14px; color: var(--latte-dark); font-size: .78rem; font-weight: 700; letter-spacing: .18em; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2 { margin: 0; font-family: Georgia, "Noto Serif TC", "PMingLiU", serif; font-weight: 600; line-height: 1.35; letter-spacing: .02em; }
h1 { max-width: 680px; font-size: clamp(2.7rem, 5vw, 4.5rem); }
.hero-description { margin: 26px 0 0; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; min-height: 48px; padding: 10px 24px; align-items: center; justify-content: center; border: 1px solid var(--latte-dark); border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--latte-dark); color: white; box-shadow: 0 8px 18px rgba(154,111,77,.16); }
.button-primary:hover { background: #865f43; }
.button-secondary { background: transparent; color: var(--latte-dark); }
.button-secondary:hover { background: var(--paper); }
.hero-art { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid rgba(197,156,119,.28); border-radius: 28px 28px 70px 28px; background: var(--cream-deep); box-shadow: 0 22px 45px rgba(89,64,45,.13); }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.motto-wrap { position: relative; }
.motto { margin: 45px 0 0; padding: 21px; border-top: 1px solid var(--line); color: var(--latte-dark); font-family: Georgia, "Noto Serif TC", serif; font-size: 1.05rem; text-align: center; letter-spacing: .16em; }

.section { padding: 108px 0; scroll-margin-top: 72px; }
.section-heading { max-width: 650px; margin: 0 auto 48px; text-align: center; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-heading > p:last-child { margin: 14px 0 0; color: var(--muted); }
.card-grid { display: grid; gap: 22px; }
.works-grid { grid-template-columns: repeat(3, 1fr); }
.work-card, .character-card { border: 1px solid rgba(231,217,202,.9); background: var(--paper); box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.work-card:hover, .character-card:hover { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(91,69,51,.1); }
.work-card { min-height: 280px; padding: 30px; border-radius: var(--radius); color: inherit; text-decoration: none; }
.work-card:focus-visible { outline: 3px solid var(--latte-dark); outline-offset: 4px; }
.card-icon { display: grid; width: 52px; height: 52px; margin-bottom: 24px; place-items: center; border-radius: 16px; background: var(--cream-deep); font-size: 1.65rem; }
.work-card h3, .character-card h3 { margin: 0 0 9px; font-family: Georgia, "Noto Serif TC", serif; font-size: 1.35rem; }
.work-card p, .character-card p { margin: 0; color: var(--muted); }
.work-cta { display: inline-block; margin-top: 22px; padding: 4px 11px; border-radius: 999px; background: #f3ede4; color: var(--latte-dark); font-size: .75rem; font-weight: 700; transition: background .2s ease, color .2s ease; }
.work-card:hover .work-cta, .work-card:focus-visible .work-cta { background: var(--latte-dark); color: white; }

.characters-section { background: #f2eadf; }
.character-showcase { position: relative; margin: 0 0 32px; }
.yaoling-feature { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(231,217,202,.9); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.yaoling-feature img { display: block; width: 100%; height: auto; object-fit: contain; }
.yaoling-feature figcaption { display: flex; padding: 18px 24px 20px; align-items: baseline; gap: 16px; }
.yaoling-feature-kicker { flex: 0 0 auto; color: var(--latte-dark); font-size: .7rem; font-weight: 800; letter-spacing: .18em; }
.yaoling-feature strong { flex: 0 0 auto; font-family: Georgia, "Noto Serif TC", serif; font-size: 1.25rem; }
.yaoling-feature figcaption > span:last-child { color: var(--muted); font-size: .9rem; }
.demon-feature { background: #160e0d; border-color: rgba(131,55,46,.55); }
.demon-feature figcaption { color: #fff5e9; }
.demon-feature .yaoling-feature-kicker { color: #e65d4f; }
.demon-feature figcaption > span:last-child { color: #d9c5b8; }
.ruoheng-feature { background: #fff8f0; border-color: rgba(203,158,124,.5); }
.ruoheng-feature .yaoling-feature-kicker { color: #a46f52; }
.showcase-slide[hidden] { display: none; }
.showcase-arrow { position: absolute; z-index: 2; top: calc(50% - 28px); display: grid; width: 46px; height: 56px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(48,34,27,.68); color: #fff; box-shadow: 0 8px 22px rgba(31,19,13,.18); font: 400 2rem/1 Georgia, serif; cursor: pointer; backdrop-filter: blur(5px); }
.showcase-arrow:hover, .showcase-arrow:focus-visible { background: rgba(48,34,27,.88); }
.showcase-arrow:focus-visible, .showcase-dot:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.showcase-arrow--prev { left: 16px; }.showcase-arrow--next { right: 16px; }
.showcase-dots { position: absolute; z-index: 2; right: 0; bottom: -22px; left: 0; display: flex; justify-content: center; gap: 9px; }
.showcase-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c7b4a5; cursor: pointer; transition: width .2s ease, background .2s ease; }
.showcase-dot.active { width: 28px; border-radius: 999px; background: var(--latte-dark); }
.character-grid { grid-template-columns: repeat(3, 1fr); }
.character-card { padding: 14px 14px 26px; border-radius: var(--radius); text-align: center; }
.character-image { aspect-ratio: 3 / 4; margin-bottom: 22px; border-radius: 18px; overflow: hidden; background: var(--cream-deep); }
.character-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.character-card--yaoling .character-image img { object-position: 52% center; }
.character-card--demon .character-image img { object-position: 50% 22%; }
.character-card p { padding-inline: 10px; font-size: .92rem; }

.about-section { background: var(--paper); }
.about-inner { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 90px; }
.about-decoration { position: relative; display: flex; min-height: 370px; padding: 60px; flex-direction: column; justify-content: center; border-radius: 50% 44% 48% 42%; background: var(--cream-deep); font-family: Georgia, "Noto Serif TC", serif; text-align: center; transform: rotate(-2deg); }
.about-decoration span, .about-decoration strong { display: block; transform: rotate(2deg); }
.about-decoration span { color: var(--muted); }.about-decoration strong { margin-top: 6px; color: var(--latte-dark); font-size: 1.7rem; }
.about-decoration .about-flower { position: absolute; right: 30px; bottom: 25px; font-size: 2.5rem; transform: rotate(12deg); }
.about-copy h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.about-copy > p:not(.eyebrow) { margin: 25px 0 0; color: var(--muted); }
blockquote { margin: 28px 0 0; padding-left: 20px; border-left: 2px solid var(--blush); color: var(--latte-dark); font-family: Georgia, "Noto Serif TC", serif; font-size: 1.15rem; }

.platforms-section { background: var(--cream); }
.platform-list { max-width: 820px; margin: auto; border-top: 1px solid var(--line); }
.platform-list a { display: grid; min-height: 92px; padding: 18px 12px; grid-template-columns: 52px 1fr auto; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .2s ease, background .2s ease; }
.platform-list a:hover { padding-inline: 20px; background: rgba(255,253,249,.65); }
.platform-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--paper); color: var(--latte-dark); font-family: Arial, sans-serif; font-weight: 700; box-shadow: 0 5px 15px rgba(91,69,51,.06); }
.platform-list strong, .platform-list small { display: block; }.platform-list small { margin-top: 2px; color: var(--muted); }.arrow { color: var(--latte-dark); font-size: 1.25rem; }

.site-footer { padding: 45px 0; background: var(--cocoa); color: #f7eee5; }
.footer-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.footer-inner strong { font-family: Georgia, serif; font-size: 1.1rem; }.footer-inner p { margin: 5px 0 0; color: #d9cabe; font-size: .86rem; }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } .fade-in { opacity: 1; transform: none; } }

@media (min-width: 901px) and (max-width: 1439px) {
  .hero-inner { grid-template-columns: minmax(0, .44fr) minmax(0, .56fr); gap: 40px; }
  .hero-copy, .hero-art { min-width: 0; }
  h1 { font-size: clamp(2.35rem, 3.7vw, 2.65rem); line-height: 1.3; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1440px) {
  .hero-inner, .characters-section .container { width: min(1320px, calc(100% - 64px)); }
  .hero-inner { grid-template-columns: minmax(0, .38fr) minmax(0, .62fr); gap: 56px; }
  .hero-copy, .hero-art { min-width: 0; }
  h1 { font-size: 2.65rem; line-height: 1.3; }
  .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-nav { gap: 16px; }.site-nav a { font-size: .85rem; }
  .hero { padding-top: 55px; }.hero-inner { grid-template-columns: 1fr 330px; gap: 25px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }.character-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { gap: 45px; }.about-decoration { min-height: 310px; padding: 35px; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 30px, 600px); }
  .header-inner { min-height: 68px; }.brand { gap: 10px; }.brand small { display: none; }
  .brand-mark { width: 48px; height: 48px; }
  .brand-mobile-name { display: block; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: grid; gap: 0; padding: 8px 20px 18px; background: rgba(248,244,237,.98); border-bottom: 1px solid var(--line); box-shadow: 0 15px 25px rgba(79,64,54,.07); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s ease; }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; }.site-nav a { padding: 11px 10px; font-size: .95rem; }.site-nav a::after { display: none; }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }.nav-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }.nav-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding-top: 60px; }.hero-inner { min-height: auto; grid-template-columns: 1fr; gap: 40px; }.hero-copy { text-align: center; }.hero-description br { display: none; }.hero-actions { justify-content: center; }.hero-art { width: min(100%, 560px); margin: 0 auto; }.motto { margin-top: 10px; }
  .section { padding: 78px 0; }.section-heading { margin-bottom: 34px; }
  .character-showcase { margin-bottom: 42px; }
  .yaoling-feature { border-radius: 20px; }
  .yaoling-feature figcaption { padding: 16px 18px 18px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .yaoling-feature figcaption > span:last-child { margin-top: 3px; }
  .showcase-arrow { top: 82px; width: 38px; height: 46px; font-size: 1.6rem; }
  .showcase-arrow--prev { left: 8px; }.showcase-arrow--next { right: 8px; }
  .works-grid { grid-template-columns: 1fr; }.work-card { min-height: auto; }
  .about-inner { grid-template-columns: 1fr; gap: 42px; }.about-decoration { width: min(100%, 390px); margin: auto; }.about-copy { text-align: center; }.about-copy blockquote { display: inline-block; text-align: left; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 20px; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.45rem; }.hero-actions { align-items: stretch; flex-direction: column; }.button { width: 100%; }
  .hero-art { border-radius: 20px 20px 42px 20px; }
  .character-grid { grid-template-columns: 1fr; }.character-card { max-width: 340px; margin-inline: auto; }
  .platform-list a { grid-template-columns: 44px 1fr auto; gap: 13px; }.platform-list small { font-size: .78rem; }
}
