@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500&family=Noto+Sans+TC:wght@300;400;500&display=swap");

:root {
  /* "Cottage Door" room (Valspar 2027), with the wall blue as the background:
     cream rug for text, beige for headings and lines, baby pink accents, wood brown buttons. */
  --night: #5E7D8C;     /* page: Cottage Door blue (a touch deeper so white text reads well) */
  --panel: #557483;     /* cards */
  --panel-2: #4C6977;   /* open panels, logo backs */
  --gold: #F3E5CC;      /* beige: name, headings */
  --gold-hi: #FFF6E6;
  --gold-lo: #D9C3A0;
  --sky: #FFD9CC;       /* baby pink: links, English lines */
  --diamond: #F3E5CC;   /* beige: frames */
  --plum: #E8B9A8;      /* apricot blush */
  --blush: #F4C9BB;     /* baby pink */
  --brass: #6B4A35;     /* wood brown: buttons */
  --wood: #6B4A35;
  --frost: #FBF8F3;
  --text: #FBF8F3;      /* off-white rug */
  --muted: #E1E8EB;
  --line: rgba(243, 229, 204, .4);   /* beige separator lines */
  --live: #D9434B;
  /* Elegant sans: Jost (light, geometric) for Latin, Noto Sans TC light for Chinese. */
  --display: "Jost", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --sans: "Jost", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 300 16px/1.8 var(--sans); letter-spacing: .02em; }
img { max-width: 100%; display: block; }
a { color: var(--sky); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* English lines sit under the Chinese, quieter */
.en { display: block; color: var(--muted); font-size: .88em; }
span[lang="en"] { color: var(--muted); }

/* metallic gold, for the name and section titles */
.foil {
  background: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold) 22%, var(--gold-hi) 46%, var(--gold) 64%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* header */
.top { display: flex; align-items: center; gap: 16px; padding: 18px 0; }
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mark .foil { font: 300 26px/1 var(--display); letter-spacing: .12em; }
.mark .zh { font: 400 15px/1 var(--display); letter-spacing: .3em; color: var(--sky); }
.top nav { display: flex; gap: 2px; margin-left: auto; }
.top nav a { color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; }
.top nav a:hover { background: var(--panel); }

/* the big player */
.stage-wrap { width: min(100%, 860px, calc((100vh - 220px) * 16 / 9)); min-width: min(100%, 560px); margin: 12px auto 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tabs button { border: 1px solid var(--line); background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--live); }
.tabs button[aria-pressed="true"] { background: var(--live); color: #fff; border-color: var(--live); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px var(--diamond), 0 0 0 6px var(--panel-2), 0 0 0 7px var(--line), 0 24px 50px rgba(20,32,40,.35); }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen .loading { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--muted); }
.now { display: flex; align-items: center; gap: 12px; padding: 16px 2px 0; min-height: 52px; }
.badge { flex: none; font-size: 13px; font-weight: 500; padding: 3px 12px; border-radius: 999px; background: var(--panel-2); color: var(--gold); }
.badge.live { background: var(--live); color: #fff; }
.now .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now .btn { margin-left: auto; flex: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; border: 0; cursor: pointer; }
.btn.gold { background: linear-gradient(180deg, #7E5A42, var(--wood) 55%, #573a28); color: #FBF3E6; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset; }
.btn.gold span[lang="en"] { color: #F4D9C9; }

.intro { max-width: 46em; margin: 0 auto; padding: 36px 0 44px; text-align: center; }
.intro p { margin: 0; }
.intro .en { margin-top: 6px; }

/* sections */
section.block { padding: 52px 0; border-top: 1px solid var(--line); }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h2 { margin: 0; font: 300 34px/1.2 var(--display); letter-spacing: .14em; }
.head h2 .en { font: 300 15px/1.4 var(--display); letter-spacing: .24em; margin-top: 6px; color: var(--sky); }
.head p { margin: 0; color: var(--muted); }
.head a.more { margin-left: auto; font-size: 15px; }

/* instagram reels */
.reels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, calc((100% - 70px) / 6)); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.reel { position: relative; scroll-snap-align: start; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--panel); border: 0; padding: 0; cursor: pointer; }
.reel img { width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: "▶"; position: absolute; left: 10px; bottom: 8px; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.reel:hover { box-shadow: 0 0 0 2px var(--gold); }
.empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line); border-radius: 10px; margin: 0; }

/* logo carousel — every logo masked to a circle */
.carousel { display: flex; align-items: center; gap: 8px; }
.carousel > .arrow, .strip .arrow { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; color: var(--gold-hi); font-size: 20px; line-height: 1; }
.strip .arrow:disabled { opacity: .3; cursor: default; }
.logos { flex: 1; display: flex; gap: 22px; overflow-x: auto; padding: 14px 10px 12px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.logos::-webkit-scrollbar { display: none; }
.logo { flex: none; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; }
.disc { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(20,32,40,.25); transition: box-shadow .15s, transform .15s; }
.disc img { width: 100%; height: 100%; object-fit: cover; }
.disc b { font: 300 26px var(--display); letter-spacing: .08em; color: var(--gold); }
.logo .label { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo:hover .disc { box-shadow: 0 0 0 2px var(--gold); }
.logo[aria-expanded="true"] .disc { box-shadow: 0 0 0 3px var(--gold), 0 0 0 8px rgba(244,201,187,.45); transform: scale(1.04); }
.logo[aria-expanded="true"] .label { color: var(--gold); font-weight: 500; }

.unit { background: var(--panel-2); border: 1px solid var(--diamond); border-radius: 12px; padding: 22px; margin-top: 18px; }
.unit-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.unit-top .mini { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.unit-top h3 { margin: 0; font: 400 22px/1.3 var(--display); letter-spacing: .1em; }
.unit-top h3 .en { font: 300 14px/1.4 var(--display); letter-spacing: .2em; color: var(--sky); }
.unit-top p { margin: 4px 0 0; color: var(--text); }
.unit-top p.en { margin-top: 0; color: var(--muted); }
.unit-top .x { margin-left: auto; align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.stage { display: grid; place-items: center; }
.stage .frame { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.stage .frame.tall { max-width: 360px; aspect-ratio: 9/16; }
.stage .frame.ig { max-width: 420px; aspect-ratio: auto; height: 640px; background: #fff; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .linkout, .stage .soon { padding: 36px; text-align: center; color: var(--muted); margin: 0; }
.strip { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; flex: 1; padding: 2px; }
.thumb { flex: none; width: 168px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.thumb .pic { aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, var(--plum), var(--diamond) 55%, var(--gold)); display: grid; place-items: center; color: var(--wood); font-weight: 500; font-size: 13px; }
.thumb .pic img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.thumb[aria-current="true"] .pic { box-shadow: 0 0 0 2px var(--gold); }
.thumb[aria-current="true"] span { color: var(--text); }

/* referral / discount box */
.deal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 10px; background: rgba(244,201,187,.16); border: 1px dashed var(--blush); }
.deal > div { flex: 1 1 260px; }
.deal strong { color: var(--blush); }
.deal .code { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 6px; background: #FBF8F3; color: var(--wood); font-weight: 500; letter-spacing: .06em; user-select: all; }
.deal small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.logo .tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--blush); color: #4a2a1e; font-weight: 500; margin-top: -4px; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 560px); gap: 16px; }
.mail { display: block; padding: 22px; border-radius: 10px; background: var(--panel); text-decoration: none; color: var(--text); border: 1px solid transparent; }
.mail:hover { border-color: var(--gold); }
.mail small { display: block; color: var(--muted); }
.mail strong { display: block; margin-top: 8px; font: 300 24px/1.3 var(--display); letter-spacing: .06em; color: var(--gold); word-break: break-all; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.socials a { color: var(--text); text-decoration: none; padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.socials a:hover { box-shadow: inset 0 0 0 1px var(--sky); color: var(--sky); }
.mail:hover, .logo:hover .disc { border-color: var(--sky); }

footer { padding: 40px 0 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* instagram viewer */
dialog { border: 0; padding: 0; background: transparent; max-width: 94vw; overflow: visible; }
dialog::backdrop { background: rgba(20, 32, 40, .86); }
dialog .box { position: relative; width: min(420px, 94vw); height: min(740px, 84vh); background: #fff; border-radius: 10px; overflow: hidden; }
dialog iframe { width: 100%; height: 100%; border: 0; }
dialog .close { position: absolute; right: -4px; top: -46px; border: 0; background: none; color: #fff; font-size: 32px; cursor: pointer; }

@media (max-width: 760px) {
  .top nav { display: none; }
  .stage-wrap { min-width: 0; margin-top: 4px; }
  .head h2 { font-size: 26px; letter-spacing: .1em; }
  .head a.more { margin-left: 0; }
  .intro { padding: 26px 0 32px; text-align: left; }
  .mail strong { font-size: 21px; }
  section.block { padding: 40px 0; }
  .totop { right: 12px; bottom: 12px; }
  .unit-top { gap: 12px; }
  .unit-top .mini { width: 40px; height: 40px; }
  .unit-top h3 { font-size: 20px; }
  .deal .code { margin: 4px 0 0; }
  .deal .btn { width: 100%; justify-content: center; }
  .now { flex-wrap: wrap; }
  .now .title { white-space: normal; flex: 1 1 100%; order: 3; }
  .contact { grid-template-columns: 1fr; }
  .logo { width: 96px; } .disc { width: 84px; height: 84px; }
  .reels { grid-auto-columns: 42%; }
  .unit { padding: 14px; }
  .stage .frame.ig { height: 560px; }
  .thumb { width: 132px; }
}
/* back to top */
.totop { position: fixed; right: 18px; bottom: 18px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--wood, #6B4A35); color: var(--frost); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(20,32,40,.35);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.totop.on { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .disc, .totop { transition: none; } }
