/* 桌上鋼琴說明網站：劇場風（深藍夜色、紅絨布幕、金色燈泡招牌、奶油色紙卡）。
   不用外部字型和外部資源；招牌、紙卡、票根用 assets/parts/ 的零件圖當 border-image，字都是真的文字。 */
:root {
  --navy: #141b3d;
  --navy-deep: #0d1330;
  --paper: #f7e8c8;
  --ink: #3a2415;
  --soft: #6b4a32;
  --wine: #7a1d22;
  --gold: #f3c252;
  --gold-deep: #b9812c;
  --cream: #fbefd5;
  color-scheme: light;
  /* 每種語言只列自己的字型：同一句話裡的字才不會被兩套字型拆開，粗細、字形不一 */
  --local-sans: "Noto Sans";
  --local-round: "Noto Sans";
}
:root:lang(zh-Hant) { --local-sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC"; --local-round: "PingFang TC"; }
:root:lang(zh-Hans) { --local-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC"; --local-round: "PingFang SC"; }
:root:lang(ja) { --local-sans: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans CJK JP", "Noto Sans JP"; --local-round: "Hiragino Maru Gothic ProN"; }
:root:lang(ko) { --local-sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR"; --local-round: "Apple SD Gothic Neo"; }
:root:lang(th) { --local-sans: Thonburi, "Leelawadee UI", "Noto Sans Thai"; --local-round: Thonburi; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--cream);
  background-color: var(--navy);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, 0.10), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 10px);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, var(--local-sans), sans-serif;
}
h1, h2, h3, .brand, .cta, .banner {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, var(--local-round), var(--local-sans), sans-serif;
}
p { margin: 0 0 0.8rem; }
.hero-tag, .hero-need, .cta, .banner, h1, h2, h3, .video-note .caption { text-wrap: balance; }
a { color: var(--gold); text-underline-offset: 3px; }
img { max-width: 100%; }
.small { font-size: 0.88rem; opacity: 0.85; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 頁首 */
.top { background: var(--navy-deep); border-bottom: 3px solid var(--gold-deep); position: relative; z-index: 5; }
.bar { display: flex; align-items: center; gap: 22px; max-width: 1320px; margin: 0 auto; padding: 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-weight: 900; font-size: 1.2rem; text-decoration: none; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 2px var(--gold-deep); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #f1d9a4; font-weight: 700; text-decoration: none; padding: 6px 2px; white-space: nowrap; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); }
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; white-space: nowrap; font-weight: 800; color: var(--wine);
  background: var(--paper); border: 2px solid var(--gold-deep); border-radius: 8px; padding: 3px 12px;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; z-index: 10;
  background: var(--paper); border: 2px solid var(--gold-deep); border-radius: 12px; min-width: 220px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.lang li a { display: block; padding: 5px 10px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.lang li a:hover, .lang li a[aria-current] { background: #f0d49a; color: var(--wine); font-weight: 700; }
.top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 54px; pointer-events: none;
  background: url(assets/parts/valance.png) top center / max(100%, 1100px) 100% no-repeat;
}
.pg-index .top::after { display: none; }

/* 區塊標題：掛著流蘇的紙招牌 */
.banner {
  position: relative;
  width: fit-content; max-width: calc(100% - 32px); margin: 0 auto 34px; text-align: center;
  color: var(--wine); font-size: 1.7rem; line-height: 1.25; font-weight: 900;
  border-style: solid; border-width: 30px 66px 14px;
  border-image: url(assets/parts/banner.png) 74 156 26 156 fill / 30px 66px 14px stretch;
}
.banner span { display: block; padding: 4px 6px 2px; }
@media (min-width: 900px) {
  .banner { font-size: 2.15rem; border-width: 38px 84px 18px; border-image-width: 38px 84px 18px; margin-bottom: 30px; }
  main > section { margin-bottom: 72px; }
  .peek { height: 140px; }
}

/* 紙卡、票根 */
.paper {
  color: var(--ink);
  border-style: solid; border-width: 30px;
  border-image: url(assets/parts/paper.png) 64 fill / 30px stretch;
}
.ticket, .hooks li, .how-list li, .more-list li, .hero-need {
  color: var(--ink);
  border-style: solid; border-width: 16px 54px;
  border-image: url(assets/parts/ticket.png) 52 132 fill / 16px 54px stretch;
  padding: 8px 16px;
}

section { position: relative; }
main > section { padding: 0 20px; margin: 0 auto 64px; }

/* 主視覺（窄的時候由上往下排；寬的時候字疊在主視覺的招牌上） */
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 16px 0; margin-bottom: 40px; }
.hero picture { order: 5; width: 100%; max-width: 620px; }
.hero-img {
  display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
}
.hero-name {
  order: 1; margin: 0; width: min(360px, 94%); aspect-ratio: 627 / 171; display: flex; align-items: center; justify-content: center;
  padding: 9% 18% 2%; color: var(--wine); font-size: clamp(20px, 7vw, 30px); font-weight: 900; line-height: 1.1; text-align: center;
  background: url(assets/parts/banner.png) center / 100% 100% no-repeat;
}
.hero-tag { order: 2; margin: 0; max-width: 560px; text-align: center; color: var(--wine); font-size: 1.12rem; font-weight: 800; line-height: 1.5; }
.hero-tag { border-style: solid; border-width: 30px; border-image: url(assets/parts/paper.png) 64 fill / 30px stretch; }
.cta {
  order: 3; width: min(340px, 90%); aspect-ratio: 961 / 318; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 15%; color: var(--wine); font-size: clamp(17px, 5.2vw, 22px); font-weight: 900; line-height: 1.15; text-decoration: none;
  background: url(assets/parts/bulbs.png) center / 100% 100% no-repeat; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
.cta:hover { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)) brightness(1.06); }
.hero-need { order: 4; margin: 0; font-weight: 800; color: var(--wine); text-align: center; font-size: 1rem; line-height: 1.3; }
@media (min-width: 1000px) {
  .hero { display: block; position: relative; container-type: inline-size; max-width: 1672px; padding: 0; margin: 0 auto 7cqw; }
  .hero picture { display: block; max-width: none; }
  .hero-img { -webkit-mask-image: none; mask-image: none; }
  .hero-name, .hero-tag, .cta, .hero-need { position: absolute; transform: translate(-50%, -50%); margin: 0; font-size: var(--fs); }
  .hero-name { left: 49.94%; top: 13.8%; width: 23.9%; aspect-ratio: auto; padding: 0; background: none; }
  .hero-tag { left: 50.1%; top: 31.9%; width: 63.4%; max-width: none; border: 0; line-height: 1.3; }
  .hero-need { left: 49.8%; top: 46.5%; width: 26.3%; border: 0; line-height: 1.1; }
  .cta { left: 18%; top: 99.4%; width: 24cqw; padding: 0 3.4cqw; }
}

/* 鉤子三句：影片右邊三張票根 */
.hooks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.hooks li { font-size: 1.02rem; line-height: 1.6; font-weight: 700; }
.hooks li:nth-child(1) { transform: rotate(-1deg); }
.hooks li:nth-child(2) { transform: rotate(0.8deg); }
.hooks li:nth-child(3) { transform: rotate(-0.5deg); }

/* 影片：拉開布幕的小舞台 */
.video-row { max-width: 1100px; margin: 0 auto; display: grid; gap: 30px; align-items: center; }
.stage {
  position: relative; width: min(400px, 100%); margin: 0 auto; padding: 46px 70px 22px;
  background: radial-gradient(ellipse at 50% 30%, #3a2a5a, var(--navy-deep) 70%); border-radius: 18px;
  box-shadow: inset 0 -16px 0 #6b3a1d, 0 18px 40px rgba(0, 0, 0, 0.45);
}
.stage::before, .stage::after { content: ""; position: absolute; top: 0; bottom: 14px; width: 72px; pointer-events: none; z-index: 2; }
.stage::before { left: -6px; background: url(assets/parts/curtain_l.png) top left / 100% 100% no-repeat; }
.stage::after { right: -6px; background: url(assets/parts/curtain_r.png) top right / 100% 100% no-repeat; }
.play {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 5px solid var(--gold-deep); background: radial-gradient(circle at 40% 35%, #ffe08a, var(--gold) 60%, #d99a2b);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55), inset 0 -4px 0 rgba(0, 0, 0, 0.15);
}
.play::before { content: ""; position: absolute; left: 34px; top: 23px; border-style: solid; border-width: 18px 0 18px 30px; border-color: transparent transparent transparent var(--wine); }
.play:hover { filter: brightness(1.06); }
.play:focus-visible { outline: 4px solid var(--cream); outline-offset: 4px; }
.play[hidden] { display: none; }
.stage video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; border: 5px solid var(--gold-deep); background: #000; position: relative; z-index: 1; }
.video-note { font-size: 1.02rem; }
.video-note .caption { font-weight: 800; color: var(--wine); margin: 0; }
@media (min-width: 900px) { .video-row { grid-template-columns: 420px 1fr; gap: 54px; } .stage { margin: 0; } .video-side { align-self: center; } }

/* 六個賣點 */
.pt-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: flex; flex-direction: column; gap: 58px; }
.pt { display: grid; gap: 22px; align-items: center; }
.pt-art { margin: 0; padding: 14px; background: var(--paper); border-radius: 20px; box-shadow: 0 0 0 4px var(--gold-deep), 0 18px 34px rgba(0, 0, 0, 0.45); }
.pt-art img { display: block; width: 100%; height: auto; border-radius: 12px; }
.pt-text {
  position: relative; color: var(--ink); padding-top: 26px;
  border-style: solid; border-width: 34px 34px 30px;
  border-image: url(assets/parts/card.png) 74 fill / 34px 34px 30px stretch;
}
.pt-text h3 { color: var(--wine); font-size: 1.7rem; line-height: 1.25; margin: 0 0 12px; font-weight: 900; }
.pt-text p { margin: 0 0 10px; }
.pt-text p:last-child { margin-bottom: 0; }
.num { display: flex; position: absolute; top: -66px; left: -10px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.num img { height: 74px; width: auto; }
@media (max-width: 899px) { .pt-art { width: min(440px, 100%); margin: 0 auto; } }
@media (min-width: 900px) {
  .pt { grid-template-columns: 5fr 7fr; gap: 56px; }
  .pt:nth-child(even) { grid-template-columns: 7fr 5fr; }
  .pt:nth-child(even) .pt-art { order: 2; }
  .pt:nth-child(even) .pt-art { transform: rotate(1.2deg); }
  .pt:nth-child(odd) .pt-art { transform: rotate(-1.2deg); }
  .pt1 { grid-template-columns: 6fr 6fr; }
  .pt-text { font-size: 1.08rem; border-width: 40px 40px 34px; margin-top: 36px; }   /* 上面突出的數字牌要的位置：配圖比文字卡矮時，數字牌才不會頂到上一條 */
  .pt-text h3 { font-size: 2.05rem; }
  .pt1 .pt-text h3 { font-size: 2.4rem; }
  .pt .pt-art { max-width: 380px; justify-self: center; }
  .pt1 .pt-art { max-width: 430px; }
  .pt-list { gap: 46px; }
  .num img { height: 92px; }
  .num { top: -80px; }
}
.peek { position: absolute; bottom: -18px; height: 118px; width: auto; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4)); }
.peek-r { left: calc(100% + 54px); }
.peek-l { right: calc(100% + 54px); }
@media (max-width: 699px) { .peek { display: none; } }

/* 截圖：木頭架子上一排，可以左右滑 */
.shelf {
  max-width: 1320px; margin: 0 auto; padding-bottom: 44px;
  background: url(assets/parts/wood.jpg) bottom center / 100% 44px no-repeat;
  border-radius: 0 0 12px 12px;
}
.shot-list {
  list-style: none; margin: 0; padding: 6px 24px 22px; display: flex; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 24px; overscroll-behavior-x: contain;
}
.shot-list:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.shot-list li { flex: 0 0 min(84%, 540px); scroll-snap-align: center; }
.shot-list img { display: block; width: 100%; height: auto; border-radius: 16px; border: 5px solid #2a170c; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5); }

/* 怎麼玩：四張票根 */
.how-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1220px; display: grid; gap: 40px 24px; }
.how-list li { position: relative; padding-top: 18px; }
.how-list .num { top: -52px; left: 50%; transform: translateX(-50%); }
.how-list .num img { height: 64px; }
.how-list p { margin: 0; font-size: 0.98rem; }
@media (min-width: 900px) { .how-list { grid-template-columns: repeat(2, 1fr); max-width: 1080px; gap: 64px 40px; } .how-list p { font-size: 1.02rem; } }
@media (max-width: 899px) { .how-list { max-width: 560px; gap: 54px; } }

/* 需要什麼 */
.needs-card { max-width: 1000px; margin: 0 auto; }
.need-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 22px; }
.need-list li { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; }
.need-list img { width: 88px; height: 88px; object-fit: contain; }
.need-list p { margin: 0; font-weight: 700; }
.needs-card .note { color: var(--soft); font-size: 0.95rem; }
@media (min-width: 900px) {
  .need-list { grid-template-columns: repeat(3, 1fr); }
  .need-list li { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .need-list img { width: 120px; height: 120px; }
}

/* 功能一覽（六條以外的） */
.more-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; }
.more-list li { flex: 1 1 320px; max-width: 560px; font-size: 0.98rem; }
.more-list li:nth-child(odd) { transform: rotate(-0.8deg); }
.more-list li:nth-child(even) { transform: rotate(0.7deg); }
.more-link { text-align: center; margin: -30px 0 60px; font-weight: 800; font-size: 1.1rem; }

/* 其他三頁：一大張紙 */
.pg-support main, .pg-privacy main, .pg-credits main {
  max-width: 960px; margin: 70px auto 70px; color: var(--ink);
  border-style: solid; border-width: 30px; border-image: url(assets/parts/paper.png) 64 fill / 30px stretch;
}
.pg-support main a, .pg-privacy main a, .pg-credits main a { color: var(--wine); }
.pg-support h1, .pg-privacy h1, .pg-credits h1 { color: var(--wine); font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.25; margin: 0.2rem 0 0.8rem; }
/* 長單字（德文、俄文的標題）排不下時在音節處斷行，不撐出紙卡 */
h1, h2, h3, p, li, dd, dt, summary { overflow-wrap: break-word; }
.pg-support h1, .pg-privacy h1, .pg-credits h1, .pg-support h2, .pg-privacy h2, .pg-credits h2 { -webkit-hyphens: auto; hyphens: auto; }
.pg-support h2, .pg-privacy h2, .pg-credits h2 { color: var(--wine); font-size: 1.35rem; margin: 2.2rem 0 0.7rem; }
.pg-support h3 { color: var(--wine); font-size: 1.08rem; margin: 0 0 0.4rem; }
.lead { font-size: 1.08rem; }
.note { color: var(--soft); }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 0.6rem; }
.qa { padding: 16px 0; border-top: 1px dashed rgba(122, 29, 34, 0.35); }
.table { overflow-x: auto; margin: 0 -6px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid rgba(122, 29, 34, 0.25); }
td p { margin: 0 0 0.4rem; }
.credit { min-width: 260px; }

/* 頁尾：木頭舞台地板 */
.foot { background: #5a2d14 url(assets/parts/wood.jpg) center / cover; border-top: 4px solid var(--gold-deep); color: var(--cream); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.foot-in { max-width: 1000px; margin: 0 auto; padding: 34px 22px 40px; text-align: center; }
.foot a { color: var(--gold); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-top: 14px; }
.foot-nav a { font-weight: 700; text-decoration: none; }

/* 根目錄的語言帶路頁 */
.root main { max-width: 760px; margin: 60px auto; padding: 0 20px; }
.root h1 { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.langs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.langs a { display: block; padding: 10px 14px; border-radius: 10px; background: var(--paper); color: var(--ink); text-decoration: none; border: 2px solid var(--gold-deep); }
.langs b { display: block; color: var(--wine); }
.langs span { font-size: 0.9rem; color: var(--soft); }

/* 手機 */
@media (max-width: 759px) {
  body { font-size: 16px; }
  .bar { flex-wrap: wrap; gap: 10px 14px; padding: 8px 14px; }
  .lang { margin-left: auto; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .lang summary { font-size: 0.88rem; padding: 3px 10px; }
  .nav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; gap: 0 16px; }
  .nav a { padding: 4px 2px; }
  .banner { font-size: 1.35rem; border-width: 26px 54px 12px; }
  main > section { padding: 0 14px; margin-bottom: 64px; }
  .paper, .pg-support main, .pg-privacy main, .pg-credits main { border-width: 22px; }
  .pg-support main, .pg-privacy main, .pg-credits main { margin: 46px 10px; }
  .pt-text h3 { font-size: 1.4rem; }
  .ticket, .hooks li, .how-list li, .more-list li { border-width: 14px 40px; padding: 6px 10px; }
  .stage { padding: 40px 54px 20px; }
  .stage::before, .stage::after { width: 54px; }
  .hero { gap: 10px; padding-top: 18px; }
  .hero-tag { font-size: 1.05rem; }
}
