:root {
  --bg: #090a12;
  --bg-soft: #11131f;
  --paper: #f2efe8;
  --ink: #f6f2ea;
  --ink-dark: #15151b;
  --muted: #aaa8b4;
  --line: rgba(255,255,255,.14);
  --gold: #d7b16c;
  --acid: #dbff3f;
  --cyan: #6de4ee;
  --violet: #8a75ff;
  --orange: #ff601e;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}
body::before { content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 200; transform: translateY(-160%); background: var(--acid); color: #10120a; padding: 8px 12px; }
.skip:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 80; border-bottom: 1px solid var(--line); background: rgba(9,10,18,.92); backdrop-filter: blur(18px); }
.header-row { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 220px; }
.brand-spark { width: 28px; height: 28px; transform: rotate(45deg); border-radius: 8px 2px 8px 2px; background: var(--orange); box-shadow: 0 0 24px rgba(255,96,30,.3); }
.brand-copy { line-height: 1.04; }
.brand-copy strong { display: block; font-size: 1rem; letter-spacing: .04em; }
.brand-copy span { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; color: #d8d6df; font-size: .88rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--acid); }
.nav-test { border: 1px solid rgba(219,255,63,.45); padding: 8px 12px; }
.menu-button { display: none; margin-left: auto; border: 1px solid var(--line); background: transparent; color: white; padding: 9px 12px; }
.game-band { background: #0d0e18; border-bottom: 1px solid var(--line); }
.game-band .shell { min-height: 38px; display: flex; align-items: center; gap: 16px; color: #a8a6b2; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.game-band img { width: 125px; }
.game-band .state { margin-left: auto; color: var(--acid); }
.hero { min-height: 650px; position: relative; display: grid; align-items: center; overflow: hidden; background: linear-gradient(90deg, rgba(7,8,16,.98), rgba(7,8,16,.8) 47%, rgba(7,8,16,.22)), url("/learn/hong-kong-mahjong/media/characters/sora-grid-engineer/background.webp") center/cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--bg)); pointer-events: none; }
.hero-grid { min-height: 650px; position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; }
.hero-copy { align-self: center; padding: 72px 0; }
.hero-logo { width: min(610px, 100%); margin: 18px 0 20px; filter: drop-shadow(0 16px 36px #000); }
.hero-character { position: relative; height: 650px; }
.hero-character img { position: absolute; bottom: -11%; right: -20px; height: 104%; width: auto; max-width: none; filter: drop-shadow(0 20px 36px rgba(0,0,0,.55)); }
.kicker, .eyebrow { margin: 0 0 10px; color: var(--acid); font-weight: 780; letter-spacing: .16em; font-size: .76rem; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; letter-spacing: -.035em; line-height: 1.12; }
.hero h1 { max-width: 690px; margin-bottom: 18px; font-size: clamp(2rem, 4vw, 4.3rem); }
.hero p:not(.kicker) { max-width: 590px; color: #ceccd5; font-size: 1.08rem; }
.button, .text-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; text-decoration: none; font-weight: 760; }
.button { padding: 0 18px; background: var(--acid); color: #12140b; clip-path: polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); }
.button.secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); clip-path: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.section { padding: 96px 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; align-items: end; margin-bottom: 42px; }
.section-head h2 { margin-bottom: 0; font-size: clamp(2.2rem, 5vw, 4.5rem); }
.section-head p { margin: 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.card { display: flex; flex-direction: column; min-height: 250px; padding: 26px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015)); text-decoration: none; }
.card:hover { border-color: rgba(219,255,63,.55); transform: translateY(-2px); }
.card small { color: var(--gold); letter-spacing: .13em; text-transform: uppercase; }
.card h3 { margin: auto 0 8px; font-size: 1.55rem; }
.card p { margin: 0; color: var(--muted); }
.card .card-link { margin-top: 18px; color: var(--acid); font-size: .82rem; }
.page-hero { padding: 76px 0 58px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% -20%, rgba(138,117,255,.25), transparent 35%); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: #918e9c; font-size: .8rem; margin-bottom: 26px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs span::before { content: "/"; margin-right: 8px; }
.page-hero h1 { max-width: 850px; margin-bottom: 18px; font-size: clamp(2.5rem, 6vw, 5.3rem); }
.page-hero .lede { max-width: 760px; color: #c4c2cc; font-size: 1.12rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 70px; align-items: start; }
.content { min-width: 0; }
.content h2 { margin-top: 60px; padding-top: 8px; font-size: 2rem; }
.content h2:first-child { margin-top: 0; }
.content h3 { margin-top: 34px; font-size: 1.3rem; }
.content p, .content li { color: #c4c2cc; }
.content strong { color: var(--ink); }
.content a { color: var(--cyan); }
.content ul, .content ol { padding-left: 1.3rem; }
.content li + li { margin-top: 9px; }
.side-nav { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; border-top: 2px solid var(--acid); background: var(--bg-soft); padding: 18px; }
.side-nav strong { display: block; margin-bottom: 10px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.side-nav a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
.side-nav a:hover, .side-nav a.active { color: var(--acid); }
.callout { margin: 28px 0; padding: 20px 22px; border-left: 3px solid var(--acid); background: rgba(219,255,63,.06); }
.callout.warning { border-color: var(--gold); background: rgba(215,177,108,.07); }
.steps { counter-reset: steps; display: grid; gap: 14px; padding: 0 !important; list-style: none; }
.steps li { counter-increment: steps; position: relative; min-height: 72px; margin: 0; padding: 18px 18px 18px 74px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.steps li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 18px; top: 17px; color: var(--acid); font: 700 1rem ui-monospace, monospace; }
.tile-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0; }
.mini-tile { width: 48px; height: 64px; padding: 4px; background: #f0ecdf; border-radius: 4px; box-shadow: 0 6px 0 #aea99d; }
.mini-tile img { width: 100%; height: 100%; object-fit: contain; }
.media-figure { margin: 0 0 44px; border: 1px solid var(--line); background: #07080d; overflow: hidden; }
.media-figure img { width: 100%; max-height: 640px; object-fit: cover; }
.media-figure.screen-shot img { aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.media-figure.design-board img { max-height: none; object-fit: contain; }
.media-figure.roster img { max-height: 720px; object-fit: cover; object-position: top; }
.media-figure figcaption, .hand-diagram figcaption, .visual-examples figcaption { padding: 13px 16px; color: var(--muted); font-size: .88rem; }
.theme-gallery { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 14px; }
.theme-gallery .media-figure { margin: 0; min-height: 420px; position: relative; }
.theme-gallery .media-figure img { height: 100%; min-height: 420px; object-fit: cover; }
.theme-gallery .media-figure figcaption { position: absolute; inset: auto 0 0; color: white; background: linear-gradient(transparent, rgba(0,0,0,.92)); padding: 58px 18px 16px; }
.lesson-tile-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 28px; align-items: flex-end; }
.lesson-tile { width: 50px; height: 68px; padding: 4px; flex: 0 0 auto; background: #f3efe2; border-radius: 5px; box-shadow: 0 5px 0 #aaa598, 0 10px 22px rgba(0,0,0,.2); }
.lesson-tile img { width: 100%; height: 100%; object-fit: contain; }
.tile-catalog { margin: 28px 0; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.tile-catalog h3 { margin: 20px 0 0; color: var(--gold); }
.tile-catalog h3:first-child { margin-top: 0; }
.visual-examples { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 46px; }
.visual-examples figure { margin: 0; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.visual-examples .lesson-tile-row { flex-wrap: nowrap; justify-content: center; min-height: 96px; padding: 16px 8px 4px; margin: 0; overflow: visible; }
.visual-examples .lesson-tile { width: 42px; height: 58px; }
.hand-diagram { margin: 26px 0 34px; padding: 22px 18px 8px; border: 1px solid rgba(219,255,63,.32); background: rgba(219,255,63,.035); }
.hand-diagram .lesson-tile-row { margin: 0 0 14px; }
.lesson-tile.is-highlight { outline: 3px solid var(--acid); outline-offset: 2px; }
.fan-group { margin-top: 32px; }
.fan-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fan-card { border: 1px solid var(--line); background: var(--bg-soft); padding: 16px 18px; border-radius: 6px; }
.fan-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fan-card h3 { margin: 0; }
.fan-value { color: var(--acid); font-weight: 700; white-space: nowrap; }
.fan-card .lesson-tile-row { margin: 12px 0; gap: 4px; }
.fan-card .lesson-tile { width: 36px; height: 49px; padding: 3px; box-shadow: 0 3px 0 #aaa598; }
.fan-card p { margin: 0; color: var(--muted); }
.senjutsu-lead { display: grid; grid-template-columns: minmax(220px,.7fr) 1.3fr; align-items: center; gap: 30px; margin-bottom: 48px; padding: 26px; border: 1px solid rgba(255,96,30,.35); background: radial-gradient(circle at 15% 50%, rgba(255,96,30,.18), transparent 45%); }
.senjutsu-lead img { width: 100%; max-height: 360px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(255,96,30,.35)); }
.senjutsu-lead h2 { margin-top: 0; }
.comparison { width: 100%; border-collapse: collapse; margin: 24px 0; }
.comparison th, .comparison td { padding: 13px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison th { color: var(--acid); background: rgba(255,255,255,.04); }
.tester-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 40px; align-items: start; }
.qr-card { padding: 20px; background: var(--paper); color: var(--ink-dark); text-align: center; }
.qr-card img { width: 220px; margin: 0 auto 12px; }
.qr-card strong { display: block; }
.qr-card small { display: block; color: #62616a; word-break: break-all; }
.copy-button { margin-top: 14px; padding: 9px 13px; border: 1px solid #292832; background: transparent; color: #17171d; cursor: pointer; font-weight: 700; }
.copy-button:hover { background: #17171d; color: white; }
.download-slot { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 22px 0; padding: 18px; border: 1px dashed rgba(219,255,63,.45); }
.download-slot span { color: var(--muted); }
.badge { display: inline-flex; padding: 5px 9px; background: rgba(219,255,63,.11); color: var(--acid); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.signup-form { display: grid; gap: 22px; margin-top: 32px; padding: clamp(22px,4vw,38px); border: 1px solid rgba(219,255,63,.34); background: linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018)); }
.signup-form fieldset { display: grid; gap: 12px; margin: 0; padding: 20px; border: 1px solid var(--line); }
.signup-form legend, .form-field > span { color: var(--ink); font-weight: 760; }
.signup-form b { color: var(--orange); }
.form-field { display: grid; gap: 8px; }
.form-field input, .form-field select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 0; background: #11131f; color: var(--ink); }
.form-field input:focus, .form-field select:focus { outline: 2px solid var(--acid); outline-offset: 2px; }
.form-grid, .check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.check-grid label { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.1); }
.check-row input, .check-grid input { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--acid); }
.check-row span { min-width: 0; }
.check-row strong, .check-row small { display: block; }
.check-row small, .form-note { color: var(--muted); }
.consent-row { border-color: rgba(109,228,238,.3); }
.consent-row a, .manage-link { color: var(--cyan); }
.company-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 13px 15px; border-left: 3px solid var(--gold); background: rgba(215,177,108,.08); }
.form-status:empty { display: none; }
.form-status.success { border-color: var(--acid); background: rgba(219,255,63,.07); }
.form-status.error { border-color: var(--orange); background: rgba(255,96,30,.08); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-form button:disabled { cursor: wait; opacity: .55; }
.legal .page-hero { background: var(--paper); color: var(--ink-dark); }
.legal .page-hero .lede { color: #55545d; }
.legal .kicker { color: #b74418; }
.legal .content p, .legal .content li { color: #c9c7d0; }
.legal-meta { color: var(--gold); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer { border-top: 1px solid var(--line); background: #07080d; padding: 48px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3,.7fr); gap: 34px; }
.footer-brand img { width: 190px; padding: 12px; background: var(--paper); }
.footer-brand p { max-width: 420px; color: var(--muted); }
.footer-links strong { display: block; margin-bottom: 10px; color: var(--gold); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-links a { display: block; padding: 5px 0; color: #b6b3bf; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 35px; padding-top: 20px; border-top: 1px solid var(--line); color: #817e8a; font-size: .74rem; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; margin: 0; padding: 18px 20px 24px; flex-direction: column; align-items: stretch; background: #0c0d16; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .menu-button { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { position: relative; z-index: 2; }
  .hero-character { position: absolute; inset: 0 -140px 0 auto; width: 62%; opacity: .42; }
  .section-head, .layout, .tester-grid { grid-template-columns: 1fr; }
  .side-nav { position: static; order: -1; max-height: none; overflow: visible; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .theme-gallery { grid-template-columns: 1fr 1fr; }
  .theme-gallery .wide { grid-column: 1 / -1; }
  .visual-examples { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 28px, var(--max)); }
  .brand { min-width: 0; }
  .brand-copy span { display: none; }
  .game-band img { width: 104px; }
  .hero, .hero-grid { min-height: 690px; }
  .hero-copy { align-self: end; padding: 120px 0 70px; }
  .hero-character { right: -190px; width: 100%; }
  .section { padding: 72px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 210px; }
  .page-hero { padding: 54px 0 42px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .download-slot { align-items: flex-start; flex-direction: column; }
  .theme-gallery, .senjutsu-lead { grid-template-columns: 1fr; }
  .form-grid, .check-grid { grid-template-columns: 1fr; }
  .theme-gallery .wide { grid-column: auto; }
  .theme-gallery .media-figure, .theme-gallery .media-figure img { min-height: 310px; }
  .lesson-tile { width: 41px; height: 56px; }
  .hand-diagram { padding-inline: 12px; }
}
@media (max-width: 680px) {
  /* 十四隻一行塞得落 343px（16px 邊距）。 */
  .fan-card .lesson-tile { width: 20px; height: 28px; padding: 2px; border-radius: 3px; box-shadow: 0 2px 0 #aaa598; }
  .fan-card .lesson-tile-row { gap: 4px; }
  .lesson-tile.is-highlight { outline-width: 2px; outline-offset: 1px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── 2026-10-22 搬入 bsweb 後新增：角色、對手卡、千術卡、FAQ、消息 ── */
.character-profile { display: grid; grid-template-columns: minmax(200px, .6fr) 1.4fr; gap: 32px; align-items: start; margin: 0 0 56px; padding: 26px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); }
.character-profile img { width: 100%; max-height: 560px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); }
.character-profile h2 { margin-top: 0; }
.quote { color: var(--gold); font-size: 1.05rem; }
.opponent-card { margin: 0; border: 1px solid var(--line); background: #0d0e18; }
.opponent-card img { width: 100%; height: 300px; object-fit: contain; object-position: bottom; }
.opponent-card figcaption { padding: 14px 16px; display: grid; gap: 4px; }
.opponent-card figcaption span { color: var(--muted); font-size: .88rem; }
.card.ability { min-height: 0; }
.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: #d7d5de; }
.news-item { border-bottom: 1px solid var(--line); padding: 0 0 28px; margin-bottom: 28px; }
@media (max-width: 680px) {
  .character-profile { grid-template-columns: 1fr; padding: 18px; }
  .character-profile img { max-height: 420px; }
}
@media (max-width: 680px) {
  .game-band .shell > span:not(.state) { display: none; }
  .game-band .state { white-space: nowrap; }
}
@media (max-width: 900px) {
  .layout > .content { order: 1; }
  .layout > .side-nav { order: 2; }
}
.annotated-frame { position: relative; }
.annotated .pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--acid); color: #10120a; font-weight: 800; font-size: .8rem; box-shadow: 0 0 0 3px rgba(9,10,18,.75), 0 4px 14px rgba(0,0,0,.5); }
.annotated .annotated-frame img { max-height: none; object-fit: contain; }
@media (max-width: 680px) { .annotated .pin { width: 20px; height: 20px; font-size: .68rem; } }
