/* App guidebook engine — 1920x1080 stage scaled to the window. Default theme is GO VAL (navy #0F1923 + red #FF4454);
   another app overrides the tokens below in its own theme.css (--red is the accent, --red-rgb its r,g,b). */
:root {
  --navy: #0F1923; --navy2: #16222E; --card: #1B2733; --card2: #223040; --line: rgba(255,255,255,.08);
  --red: #FF4454; --red-rgb: 255,68,84; --page: #0A1118; --glow: #172636; --scr: #0F1923; --sb-ink: #fff; --red-soft: rgba(var(--red-rgb),.14); --red-ring: rgba(var(--red-rgb),.55);
  --ink: #F4F6F8; --sub: #A9B6C3; --faint: #6E7D8C;
  --cyan: #4FD1C5; --violet: #A78BFA; --amber: #F6B94C; --green: #4ADE80; --blue: #60A5FA;
  --ease: cubic-bezier(.22,.8,.24,1); --spring: cubic-bezier(.34,1.4,.5,1);
  --font: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--page); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal;
  text-transform: none; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; display: inline-block; }

#viewport { position: fixed; inset: 0; display: grid; place-items: center; }
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: radial-gradient(1200px 800px at 18% 30%, var(--glow) 0%, transparent 60%),
              radial-gradient(900px 700px at 95% 110%, rgba(var(--red-rgb),.10) 0%, transparent 60%), var(--navy);
  border-radius: 0; cursor: pointer; }
#stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(1000px 700px at 30% 40%, #000 0%, transparent 75%); }

/* ---------- chrome: brand, chapter rail, progress ---------- */
.brand { position: absolute; left: 72px; top: 52px; display: flex; align-items: center; gap: 14px; z-index: 5; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.brand b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.brand span { font-size: 17px; color: var(--sub); font-weight: 600; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.15); }
.rail { position: absolute; right: 72px; top: 54px; display: flex; gap: 8px; z-index: 5; }
.rail i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.05);
  color: var(--faint); font-size: 22px; transition: all .5s var(--ease); }
.rail i.on { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(var(--red-rgb),.35); transform: translateY(-2px); }
.rail i.done { color: var(--sub); background: rgba(255,255,255,.08); }
.progress { position: absolute; left: 72px; right: 72px; bottom: 40px; height: 4px; display: flex; gap: 6px; z-index: 5; }
.progress span { flex: 1; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; position: relative; }
.progress span b { position: absolute; inset: 0; width: 0; background: var(--red); border-radius: 4px; transition: width .7s var(--ease); }
.pageno { position: absolute; right: 72px; bottom: 56px; font-size: 15px; color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; z-index: 5; }

/* ---------- slide container + transitions ---------- */
.slide { position: absolute; inset: 0; }
.slide.enter .anim { opacity: 0; transform: translateY(26px); }
.slide .anim { transition: opacity .7s var(--ease), transform .8s var(--ease); }
.slide.leave { animation: leave .45s var(--ease) forwards; }
/* A departing screenshot must not cover the next screenshot or its measured target. */
.slide.leave .phone, .slide.leave .wire, .slide.leave .callout { visibility: hidden; }
@keyframes leave { to { opacity: 0; transform: translateX(-60px) scale(.98); filter: blur(4px); } }
.slide.leave.back { animation-name: leaveBack; }
@keyframes leaveBack { to { opacity: 0; transform: translateX(60px) scale(.98); filter: blur(4px); } }

/* ---------- phone ---------- */
.phone { position: absolute; width: 420px; border-radius: 58px; padding: 13px; background: linear-gradient(145deg, #2A3542, #0B1016);
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1.5px rgba(255,255,255,.08) inset, 0 0 0 2px #05080B; }
.phone .scr { position: relative; border-radius: 46px; overflow: hidden; background: var(--scr); }
.phone .sb { position: absolute; left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px 0 38px; font-size: 16px; font-weight: 700; color: var(--sb-ink); z-index: 3; background: var(--scr); }
.phone .sb .ic { display: flex; gap: 6px; font-size: 18px; }
.phone .cam { position: absolute; top: 12px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #05080B; z-index: 4; box-shadow: 0 0 0 3px #111A22; }
.phone.ios .cam { width: 108px; height: 30px; margin-left: -54px; border-radius: 18px; top: 10px; box-shadow: none; }
.phone .shots { position: relative; margin-top: 44px; aspect-ratio: 720 / 1460; overflow: hidden; }
.phone .shots img { position: absolute; left: 0; top: 0; width: 100%; height: auto; opacity: 0; transform: none; }
.phone .shots img.on { opacity: 1; transform: none; }
.phone .home { position: absolute; bottom: 8px; left: 50%; width: 140px; height: 5px; margin-left: -70px; border-radius: 4px; background: rgba(255,255,255,.55); z-index: 3; }
.phone.land { width: 980px; border-radius: 52px; }
.phone.land .scr { border-radius: 40px; }
.phone.land .shots { margin-top: 0; aspect-ratio: 1440 / 665; }
.phone.land .sb, .phone.land .home { display: none; }
.phone.land .cam { top: 50%; left: 12px; margin: -11px 0 0 0; }
.plat { position: absolute; bottom: -58px; left: 0; right: 0; display: flex; justify-content: center; }
.plat b { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; font-size: 18px; font-weight: 700;
  background: rgba(255,255,255,.07); color: var(--ink); }
.plat b .ms { font-size: 22px; color: var(--green); }
.plat b.ios .ms { color: #fff; }

/* spotlight */
.spot { position: absolute; z-index: 2; border: 3px solid var(--red); border-radius: 22px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 9999px rgba(5,9,13,.62); transition: opacity .4s var(--ease); }
.spot.on { opacity: 1; }
.spot::after { content: none; }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
.tap { position: absolute; z-index: 3; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: rgba(255,255,255,.35); box-shadow: 0 0 0 2px rgba(255,255,255,.75); transition: left .65s var(--ease), top .65s var(--ease), opacity .3s; }
.tap.on { opacity: 1; animation: tap 1.8s .5s var(--ease) infinite; }
@keyframes tap { 0%,60%,100% { transform: scale(1); } 30% { transform: scale(.72); background: rgba(var(--red-rgb),.5); } }

/* callout bubble next to the phone */
.callout { position: absolute; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 14px; border-radius: 20px;
  background: #fff; color: #101820; font-size: 22px; font-weight: 750; white-space: nowrap; box-shadow: 0 18px 40px rgba(0,0,0,.4);
  opacity: 0; transform: translateX(-12px) scale(.96); transition: top .65s var(--ease), left .65s var(--ease), opacity .4s var(--ease), transform .55s var(--spring); }
.callout.on { opacity: 1; transform: none; }
.callout .ms { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 24px; }
.callout::before { content: ''; position: absolute; left: -7px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.callout.left::before { left: auto; right: -7px; }
.wire { position: absolute; z-index: 5; height: 2px; background: linear-gradient(90deg, var(--red), rgba(var(--red-rgb),.2)); transform-origin: 0 50%;
  opacity: 0; transition: all .65s var(--ease), opacity .4s; }
.wire.on { opacity: 1; }
.wire::before { content: none; }

/* ---------- text panel ---------- */
.panel { position: absolute; left: 1010px; top: 150px; width: 820px; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--red-soft);
  color: var(--red); font-size: 20px; font-weight: 750; }
.chip .ms { font-size: 24px; }
.panel h1 { margin-top: 26px; font-size: 64px; line-height: 1.16; font-weight: 800; letter-spacing: -.025em; word-break: keep-all; }
.panel .sub { margin-top: 18px; font-size: 26px; line-height: 1.5; color: var(--sub); font-weight: 500; word-break: keep-all; max-width: 780px; }
.steps { margin-top: 36px; display: flex; flex-direction: column; gap: 9px; }
.step { display: flex; align-items: center; gap: 16px; padding: 11px 20px 11px 12px; border-radius: 20px; background: rgba(255,255,255,.035);
  color: var(--sub); font-size: 23px; font-weight: 650; transition: all .5s var(--ease); width: max-content; max-width: 820px; }
.step .ms { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 28px; color: var(--sub); transition: all .5s var(--ease); }
.step.now { background: var(--card2); color: var(--ink); transform: translateX(8px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.step.now .ms { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(var(--red-rgb),.35); }
.step.past { color: var(--faint); }
.step.past .ms { color: var(--faint); }
.steps.many .step { font-size: 22px; padding: 12px 20px 12px 12px; }
.steps.many .step .ms { width: 42px; height: 42px; font-size: 24px; border-radius: 13px; }
.steps.many { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 12px; margin-top: 34px; }

/* description card: lets the page explain itself without narration */
.desc { margin-top: 30px; display: flex; align-items: flex-start; gap: 18px; padding: 22px 28px 22px 22px; border-radius: 26px;
  background: linear-gradient(135deg, rgba(var(--red-rgb),.10), rgba(255,255,255,.04)); box-shadow: inset 0 0 0 1px rgba(var(--red-rgb),.22), 0 16px 34px rgba(0,0,0,.25);
  max-width: 800px; }
.desc .ms { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--red); color: #fff; font-size: 28px; box-shadow: 0 8px 20px rgba(var(--red-rgb),.35); }
.desc p { font-size: 27px; line-height: 1.5; font-weight: 600; color: var(--ink); word-break: keep-all; padding-top: 6px; }
.desc.empty { visibility: hidden; }
.desc b { display: none; }
.desc.swap { animation: descIn .55s var(--ease); }
@keyframes descIn { from { opacity: 0; transform: translateY(10px); } }
.desc.center { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 1300px; width: max-content; margin: 0; }
.desc.center.swap { animation: descInC .55s var(--ease); }
@keyframes descInC { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- intro / cover / outro ---------- */
.hero { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero .appicon { width: 168px; height: 168px; border-radius: 40px; box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
.hero h1 { margin-top: 44px; font-size: 92px; font-weight: 850; letter-spacing: -.03em; }
.hero p { margin-top: 18px; font-size: 30px; color: var(--sub); font-weight: 550; }
.tabs6 { margin-top: 60px; display: flex; gap: 18px; }
.tabs6 div { width: 150px; padding: 24px 0 20px; border-radius: 28px; background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 21px; font-weight: 700; color: var(--sub); box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.tabs6 .ms { font-size: 40px; color: var(--red); }
.cover { position: absolute; inset: 0; }
.cover .num { position: absolute; left: 150px; top: 250px; font-size: 300px; font-weight: 900; line-height: .8; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px rgba(var(--red-rgb),.55); }
.cover .bigicon { position: absolute; right: 120px; top: 170px; width: 640px; height: 640px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(var(--red-rgb),.16), transparent 66%); }
.cover .bigicon .ms { font-size: 300px; color: var(--red); filter: drop-shadow(0 30px 60px rgba(var(--red-rgb),.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-18px) rotate(-3deg); } }
.cover .txt { position: absolute; left: 160px; top: 560px; width: 1000px; }
.cover h1 { font-size: 104px; font-weight: 850; letter-spacing: -.035em; }
.cover p { margin-top: 18px; font-size: 30px; color: var(--sub); font-weight: 550; }
.cover .chips { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.cover .chips span { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px 12px 14px; border-radius: 999px; background: var(--card); font-size: 22px; font-weight: 650; color: var(--ink); }
.cover .chips .ms { color: var(--red); font-size: 24px; }
.disc { position: absolute; left: 0; right: 0; bottom: 92px; text-align: center; font-size: 17px; color: var(--faint); }

/* ---------- gallery (fan of small phones) ---------- */
.gallery { position: absolute; left: 0; right: 0; top: 300px; display: flex; justify-content: center; gap: 26px; }
.gphone { width: 214px; border-radius: 30px; padding: 7px; background: linear-gradient(145deg, #2A3542, #0B1016); box-shadow: 0 24px 50px rgba(0,0,0,.45);
  transition: transform .6s var(--spring), opacity .5s var(--ease), filter .5s; }
.gphone .scr { border-radius: 24px; overflow: hidden; aspect-ratio: 720/1460; background: var(--scr); }
.gphone img { width: 100%; display: block; }
.gphone p { margin-top: 16px; text-align: center; font-size: 21px; font-weight: 700; color: var(--sub); display: flex; align-items: center; justify-content: center; gap: 6px; transition: color .4s; }
.gphone p .ms { font-size: 22px; color: var(--red); }
.gallery.focus .gphone { opacity: .45; filter: saturate(.6); }
.gallery.focus .gphone.now { opacity: 1; filter: none; transform: translateY(-12px) scale(1.07); z-index: 2; }
.gallery.focus .gphone.now p { color: var(--ink); }
.gtitle { position: absolute; left: 0; right: 0; top: 120px; text-align: center; }
.gtitle h1 { margin-top: 22px; font-size: 58px; font-weight: 800; letter-spacing: -.025em; }

/* ---------- compare ---------- */
.cmp { position: absolute; left: 110px; top: 110px; width: 1000px; height: 860px; }
.cmp .phone { width: 340px; border-radius: 46px; padding: 10px; }
.cmp .phone .scr { border-radius: 42px; }
.vs { position: absolute; left: 418px; top: 400px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--red); font-weight: 800; font-size: 20px; box-shadow: 0 10px 30px rgba(var(--red-rgb),.4); z-index: 3; }
.panel.right { left: 1170px; width: 660px; }
.panel.right h1 { font-size: 54px; }
.panel.right .sub { font-size: 24px; }
.panel.right .step { font-size: 23px; max-width: 660px; white-space: normal; }

/* ---------- dock (hidden in recording mode) ---------- */
.dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 20px;
  background: rgba(20,30,40,.82); backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(0,0,0,.4); z-index: 50; transition: opacity .3s, transform .3s; }
.dk { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--sub); transition: background .15s, transform .12s, color .15s; }
.dk .ms { font-size: 24px; }
.dk:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.dk:active { transform: scale(.92); background: rgba(255,255,255,.14); }
.dk.on { color: var(--red); }
.dk-sep { width: 1px; height: 26px; background: rgba(255,255,255,.12); margin: 0 4px; }
body.rec .dock { opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }
body.rec #stage { cursor: none; }

/* ---------- table of contents ---------- */
.toc { position: fixed; inset: 0; z-index: 60; background: rgba(6,10,14,.7); backdrop-filter: blur(8px); display: grid; place-items: center; }
.toc[hidden] { display: none; }
.toc .box { width: min(980px, 92vw); max-height: 86vh; overflow: auto; padding: 28px; border-radius: 28px; background: var(--navy2); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.toc h2 { font-size: 22px; margin: 6px 6px 16px; display: flex; align-items: center; gap: 10px; }
.toc .ch { margin-top: 14px; }
.toc .ch > b { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--red); padding: 6px; }
.toc .ch .row { display: flex; flex-wrap: wrap; gap: 6px; }
.toc button.it { padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.05); color: var(--sub); font-size: 15px; font-weight: 600; transition: background .15s, transform .1s; }
.toc button.it:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.toc button.it:active { transform: scale(.96); }
.toc button.it.now { background: var(--red); color: #fff; }

.toc .langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 6px 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.toc button.lg { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--sub); font-size: 14px; font-weight: 650; transition: background .15s, transform .1s; }
.toc button.lg:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.toc button.lg:active { transform: scale(.95); }
.toc button.lg.now { background: var(--red); color: #fff; }

/* right-to-left text (Arabic): the stage layout stays, text blocks flip */
body.rtl .panel, body.rtl .desc, body.rtl .gtitle, body.rtl .cover .txt, body.rtl .hero, body.rtl .callout, body.rtl .pv, body.rtl .toc .box { direction: rtl; }
body.rtl .step.now { transform: translateX(-8px); }

/* scripts other than Hangul/Latin */
:root:lang(ja) body { font-family: 'Pretendard Variable', 'Hiragino Sans', 'Noto Sans JP', sans-serif; }
:root:lang(zh-CN) body { font-family: 'Pretendard Variable', 'PingFang SC', 'Noto Sans SC', sans-serif; }
:root:lang(zh-TW) body { font-family: 'Pretendard Variable', 'PingFang TC', 'Noto Sans TC', sans-serif; }
:root:lang(th) body { font-family: 'Pretendard Variable', 'Noto Sans Thai', Thonburi, sans-serif; }
:root:lang(ar) body { font-family: 'Noto Sans Arabic', 'Geeza Pro', 'Pretendard Variable', sans-serif; }
:root:lang(ja) .panel h1, :root:lang(zh-CN) .panel h1, :root:lang(zh-TW) .panel h1 { letter-spacing: 0; }

/* ---------- presenter (script window) ---------- */
body.presenter { overflow: auto; background: #0B1219; }
body.presenter #viewport, body.presenter .dock { display: none; }
.pv { max-width: 1100px; margin: 0 auto; padding: 28px 28px 120px; }
.pv .top { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--sub); font-weight: 650; font-size: 18px; }
.pv .top .ttl { color: var(--ink); font-size: 22px; font-weight: 750; }
.pv .now { margin-top: 26px; padding: 34px 38px; border-radius: 28px; background: var(--card); font-size: 40px; line-height: 1.6; font-weight: 600; word-break: keep-all; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.pv .now small { display: flex; align-items: center; gap: 8px; color: var(--red); font-size: 18px; font-weight: 750; margin-bottom: 12px; }
.pv .next { margin-top: 18px; padding: 22px 28px; border-radius: 22px; background: rgba(255,255,255,.04); color: var(--faint); font-size: 24px; line-height: 1.55; word-break: keep-all; }
.pv .next small { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.pv .ctl { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; border-radius: 20px; background: rgba(20,30,40,.9); }
.pv .ctl button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 18px; font-weight: 700; transition: transform .1s, background .15s; }
.pv .ctl button:active { transform: scale(.95); background: rgba(255,255,255,.14); }
.pv .ctl button.pri { background: var(--red); color: #fff; }
.pv .timer { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition-duration: .01ms !important; } }

/* ---------- portrait (phones, in-app) : 1000 x 1800 stage ---------- */
body.portrait .brand { left: 56px; top: 50px; }
body.portrait .rail { left: 56px; right: auto; top: 118px; }
body.portrait .rail i { width: 46px; height: 46px; font-size: 25px; }
body.portrait .progress { left: 56px; right: 56px; bottom: 44px; height: 6px; }
body.portrait .pageno { right: 56px; top: 60px; bottom: auto; font-size: 22px; }
body.portrait .panel, body.portrait .panel.right { left: 56px; right: 56px; top: 200px; width: auto; }
body.portrait .panel .chip { font-size: 24px; }
body.portrait .panel h1, body.portrait .panel.right h1 { margin-top: 16px; font-size: 56px; line-height: 1.12; }
body.portrait .panel .sub, body.portrait .panel.right .sub { margin-top: 10px; font-size: 30px; max-width: none; }
body.portrait .steps { display: none; }
body.portrait .phone { width: 420px; }
body.portrait .phone.land { width: 900px; }
body.portrait .desc { position: absolute; left: 0; right: 0; top: 1200px; max-width: none; margin: 0; padding: 26px 30px 26px 26px; }
body.portrait .slide:has(.phone.land) .desc { top: 880px; }
body.portrait .panel.right .desc { top: 1230px; }
body.portrait .desc .ms { width: 60px; height: 60px; font-size: 32px; }
body.portrait .desc b { display: block; font-size: 26px; font-weight: 800; color: var(--red); margin-bottom: 4px; padding-top: 4px; }
body.portrait .desc p { font-size: 32px; padding-top: 0; }
body.portrait .desc.empty { visibility: visible; }
body.portrait .cmp { left: 100px; top: 480px; width: 888px; height: 900px; }
body.portrait .cmp .phone { width: 380px; }
body.portrait .vs { left: 368px; top: 380px; }
body.portrait .cmp .plat { bottom: -56px; }
body.portrait .gtitle { top: 190px; }
body.portrait .gtitle h1 { font-size: 60px; }
body.portrait .gallery { top: 390px; left: 0; right: auto; justify-content: flex-start; gap: 26px; transition: transform .6s var(--ease); }
body.portrait .gphone p { font-size: 26px; }
body.portrait .gallery.focus .gphone.now { transform: none; }
body.portrait .desc.center { left: 56px; right: 56px; top: 1400px; bottom: auto; transform: none; width: auto; max-width: none; }
body.portrait .desc.center.swap { animation-name: descIn; }
body.portrait .hero h1 { font-size: 76px; text-align: center; padding: 0 40px; }
body.portrait .hero p { font-size: 32px; padding: 0 56px; }
body.portrait .tabs6 { flex-wrap: wrap; justify-content: center; max-width: 820px; gap: 16px; }
body.portrait .tabs6 div { width: 240px; font-size: 26px; }
body.portrait .disc { bottom: 110px; padding: 0 56px; font-size: 22px; }
body.portrait .cover .num { left: 56px; top: 240px; font-size: 240px; }
body.portrait .cover .bigicon { left: 50%; right: auto; top: 380px; width: 560px; height: 560px; margin-left: -280px; }
body.portrait .cover .bigicon .ms { font-size: 260px; }
body.portrait .cover .txt { left: 56px; right: 56px; top: 1000px; width: auto; }
body.portrait .cover h1 { font-size: 96px; }
body.portrait .cover p { font-size: 34px; }
body.portrait .cover .chips span { font-size: 26px; }
body.app .dk[data-cmd=presenter], body.app .dk[data-cmd=hide], body.app .dk[data-cmd=full] { display: none; }
body.app .dk-sep { display: none; }
body.portrait .dock { bottom: max(14px, env(safe-area-inset-bottom)); }
body.portrait .slide { top: var(--pad); bottom: auto; height: 1800px; }
body.portrait .progress { top: 182px; bottom: auto; }
body.portrait.ios-app .phone .cam { width: 108px; height: 30px; margin-left: -54px; border-radius: 18px; top: 10px; box-shadow: none; }
body.portrait .dk[data-cmd=presenter], body.portrait .dk[data-cmd=hide], body.portrait .dk[data-cmd=full], body.portrait .dk-sep { display: none; }
/* keep-all only suits Korean; Japanese/Chinese/Thai break per character or by the browser */
:root:lang(ja) *, :root:lang(zh-CN) *, :root:lang(zh-TW) *, :root:lang(th) * { word-break: normal; line-break: strict; }
/* long labels (other languages) must not run into the text panel */
.callout { max-width: 340px; white-space: normal; line-height: 1.25; }

/* ---------- table slide ---------- */
.tbl { position: absolute; inset: 0; }
.tbl__head { position: absolute; left: 160px; top: 120px; right: 160px; }
.tbl__head h1 { margin-top: 20px; font-size: 56px; font-weight: 800; letter-spacing: -.02em; }
.tbl__head .sub { margin-top: 10px; font-size: 24px; color: var(--sub); }
.tbl table { position: absolute; left: 160px; right: 160px; top: 330px; border-collapse: separate; border-spacing: 0 8px; font-size: 24px; }
.tbl th { text-align: left; font-size: 17px; font-weight: 700; color: var(--faint); padding: 0 22px 4px; letter-spacing: .02em; }
.tbl td { padding: 14px 22px; background: rgba(255,255,255,.04); font-weight: 600; font-variant-numeric: tabular-nums; transition: background .4s var(--ease), color .4s; }
.tbl td:first-child { border-radius: 16px 0 0 16px; color: var(--ink); }
.tbl td:last-child { border-radius: 0 16px 16px 0; }
.tbl tr.row { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.slide.enter .tbl tr.row { opacity: 0; transform: translateY(14px); }
.tbl tr.hl td { background: var(--red-soft); color: #fff; }
.tbl tr.hl td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.tbl__note { position: absolute; left: 160px; right: 160px; bottom: 210px; font-size: 20px; color: var(--sub); }
.tbl__note a { color: var(--red); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.tbl .desc { position: absolute; left: 160px; right: 160px; bottom: 80px; max-width: none; }
body.portrait .tbl__head { left: 56px; right: 56px; top: 200px; }
body.portrait .tbl table { left: 56px; right: auto; width: 888px; top: 420px; font-size: 31px; }
body.portrait .tbl th { font-size: 23px; }
body.portrait .tbl td { padding-top: 20px; padding-bottom: 20px; }
body.portrait .tbl td, body.portrait .tbl th { padding-left: 22px; padding-right: 22px; }
body.portrait .tbl__head .sub { font-size: 30px; }
body.portrait .tbl__note { font-size: 27px; line-height: 1.45; }
body.portrait .tbl__note { left: 56px; right: 56px; bottom: auto; top: 1240px; }
body.portrait .tbl .desc { left: 56px; right: 56px; bottom: auto; top: 1400px; }

.outro-links { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.olink { display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px 16px 18px; border-radius: 18px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 700; transition: background .15s, transform .1s; }
.olink .ms { color: var(--red); font-size: 26px; }
.olink:hover { background: var(--card2); }
.olink:active { transform: scale(.96); }

.gphone .scr { position: relative; }
.gph-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; color: var(--red); background: radial-gradient(circle, rgba(255,68,84,.14), transparent 60%), #0F1923; }

/* ---------- about card (slide.about: what · example · where) ---------- */
.desc.about p { display: flex; flex-direction: column; gap: 10px; font-size: 24px; line-height: 1.45; padding-top: 2px; }
.desc.about .ab { display: block; }
.desc.about .ab em { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 3px 12px 3px 8px; border-radius: 999px; background: rgba(var(--red-rgb),.16);
  color: var(--red); font-style: normal; font-size: 19px; font-weight: 800; vertical-align: 2px; white-space: nowrap; }
.desc.about .ab em .ms { display: inline; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; color: inherit; font-size: 20px; }
.desc.about .ab-ex { color: var(--sub); }
body.portrait .desc.about p { font-size: 29px; gap: 14px; }
body.portrait .desc.about .ab em { font-size: 23px; }
body.portrait .desc.about .ab em .ms { font-size: 24px; }
body.rtl .desc.about .ab em { margin-right: 0; margin-left: 10px; }

/* ---------- search (top of the contents panel) ---------- */
.toc .sfield { display: flex; align-items: center; gap: 10px; margin: 0 6px 16px; padding: 0 16px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: box-shadow .15s, background .15s; cursor: text; }
.toc .sfield:focus-within { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px var(--red); }
.toc .sfield .ms { color: var(--sub); font-size: 24px; }
.toc .sfield input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; }
.toc .sfield input::placeholder { color: var(--faint); font-weight: 500; }
.toc .sfield input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.toc .sres { display: flex; flex-direction: column; gap: 6px; }
.toc .sres .none { padding: 18px 8px; color: var(--sub); font-size: 15px; }
.toc button.hit { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); text-align: start;
  transition: background .15s, transform .1s; }
.toc button.hit:hover { background: rgba(255,255,255,.09); }
.toc button.hit:active { transform: scale(.985); background: rgba(255,255,255,.13); }
.toc button.hit > .ms { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(var(--red-rgb),.16); color: var(--red); font-size: 21px; }
.toc button.hit b { display: block; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; word-break: keep-all; }
.toc button.hit b i { font-style: normal; color: var(--faint); }
.toc button.hit small { display: block; margin-top: 3px; color: var(--sub); font-size: 13.5px; line-height: 1.45; word-break: keep-all; }
.toc button.hit mark { background: rgba(var(--red-rgb),.28); color: var(--ink); border-radius: 4px; padding: 0 2px; }

/* sentence tables (problem → fix) become stacked cards on a phone */
body.portrait .tbl--text table { top: 400px; border-spacing: 0; }
body.portrait .tbl--text thead { display: none; }
body.portrait .tbl--text tbody, body.portrait .tbl--text tr.row { display: block; }
body.portrait .tbl--text tr.row { margin-bottom: 12px; }
body.portrait .tbl--text table { top: 400px; }
body.portrait .tbl--text td { display: block; padding: 0 26px; }
body.portrait .tbl--text td:first-child { border-radius: 20px 20px 0 0; padding-top: 22px; padding-bottom: 0; font-size: 33px; font-weight: 800; }
body.portrait .tbl--text td:last-child { border-radius: 0 0 20px 20px; padding-bottom: 22px; padding-top: 8px; font-size: 29px; line-height: 1.42; color: var(--sub); word-break: keep-all; }
body.portrait .tbl--text tr.hl td:last-child { color: #fff; }
/* phone: table slides flow top to bottom so long titles and translated rows never overlap */
body.portrait .tbl { display: flex; flex-direction: column; padding: 200px 56px 0; }
body.portrait .tbl .tbl__head, body.portrait .tbl table, body.portrait .tbl .tbl__note, body.portrait .tbl .desc { position: static; left: auto; right: auto; top: auto; bottom: auto; }
body.portrait .tbl table { width: 100%; margin-top: 24px; }
body.portrait .tbl .tbl__note { margin-top: 18px; }
body.portrait .tbl .desc { margin-top: 30px; }
body.portrait .tbl { padding-top: calc(210px + var(--pad, 0px) / 2); }
body.portrait .tbl__head h1 { font-size: 52px; line-height: 1.2; }
body.portrait .tbl--text tr.row { margin-bottom: 10px; }
body.portrait .tbl--text td:first-child { font-size: 30px; padding-top: 18px; }
body.portrait .tbl--text td:last-child { font-size: 26px; padding-bottom: 18px; }
/* long tables (8+ rows): tighter rows, and on a wide screen the description card moves beside the table */
.tbl--dense table { top: 312px; right: 700px; border-spacing: 0 5px; font-size: 19px; }
.tbl--dense td { padding: 8px 16px; }
.tbl--dense th { padding: 0 16px 2px; font-size: 15px; }
.tbl--dense .tbl__note { left: auto; right: 160px; width: 480px; bottom: auto; top: 640px; }
.tbl--dense .desc { left: auto; right: 160px; width: 480px; bottom: auto; top: 300px; }
body.portrait .tbl--dense table { font-size: 21px; border-spacing: 0 5px; }
body.portrait .tbl--dense td { padding: 9px 10px; }
body.portrait .tbl--dense th { font-size: 18px; padding: 0 10px 2px; }
body.portrait .tbl--dense .desc, body.portrait .tbl--dense .tbl__note { width: auto; }

/* hidden-buttons hint and the bottom edge that brings the dock back */
.rechint { position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; max-width: min(720px, 92vw);
  padding: 12px 18px 12px 14px; border-radius: 16px; background: var(--navy2, #16222E); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 16px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease); }
.rechint .ms { color: var(--red); font-size: 22px; }
.rechint.on { opacity: 1; transform: translate(-50%, 0); }
.dock-zone { display: none; }
body.rec .dock-zone { display: block; position: fixed; left: 0; right: 0; bottom: 0; height: 90px; z-index: 49; }
body.rec .dock-zone:hover ~ .dock, body.rec .dock:hover { opacity: 1; pointer-events: auto; transform: translateX(-50%); }
body.rtl .rechint { direction: rtl; }

/* ---------- route: how to reach this screen (under the title) ---------- */
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 16px; max-width: 800px; color: var(--sub); font-size: 20px; font-weight: 650; }
.route > .ms { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(var(--red-rgb),.16); color: var(--red); font-size: 20px; margin-right: 6px; }
.route > span:not(.ms) { padding: 5px 12px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--ink); white-space: nowrap; }
.route > .ms + span ~ .ms, .route > span + .ms { width: auto; height: auto; background: none; margin: 0; color: var(--faint); font-size: 20px; }
.gtitle .route { justify-content: center; margin: 14px auto 0; }
.tbl__head .route { margin-top: 12px; }
body.portrait .route { font-size: 26px; max-width: none; margin-top: 14px; }
body.portrait .route > .ms { width: 42px; height: 42px; font-size: 26px; }
body.portrait .route > span:not(.ms) { padding: 6px 14px; white-space: normal; }
body.portrait .route > span + .ms { font-size: 26px; }
body.portrait .gtitle .route { justify-content: center; margin: 14px 40px 0; }
body.rtl .route > span + .ms { transform: scaleX(-1); }

/* step.go: how the step's screen or dialog opens (above the step text) */
.desc .howto { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--red); font-style: normal; font-size: 20px; font-weight: 750; }
.desc .howto[hidden] { display: none; }
.desc .howto .ms { display: inline; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; color: inherit; font-size: 22px; }
body.portrait .desc .howto { font-size: 26px; }
body.portrait .desc .howto .ms { font-size: 28px; }

/* wide screen: table slides flow top to bottom too, so the note and the card never overlap */
.tbl:not(.tbl--dense) { display: flex; flex-direction: column; padding: 110px 160px 0; }
.tbl:not(.tbl--dense) .tbl__head, .tbl:not(.tbl--dense) table, .tbl:not(.tbl--dense) .tbl__note, .tbl:not(.tbl--dense) .desc { position: static; left: auto; right: auto; top: auto; bottom: auto; }
.tbl:not(.tbl--dense) table { margin-top: 22px; max-width: 1180px; }
.tbl:not(.tbl--dense) .tbl__note { margin-top: 14px; }
.tbl:not(.tbl--dense) .desc { margin-top: 22px; max-width: 1300px; }
body.portrait .tbl:not(.tbl--dense) { padding: calc(210px + var(--pad, 0px) / 2) 56px 0; }
.tbl--dense .tbl__head .route { max-width: 1000px; }

/* description card text steps down when it would run under the dock (fitDesc) */
.desc.fit1 p { font-size: 24px; } .desc.fit1.about p { font-size: 22px; }
.desc.fit2 p { font-size: 21px; line-height: 1.4; } .desc.fit2.about p { font-size: 20px; gap: 6px; }
body.portrait .desc.fit1 p { font-size: 28px; } body.portrait .desc.fit1.about p { font-size: 26px; gap: 10px; }
body.portrait .desc.fit2 p { font-size: 25px; } body.portrait .desc.fit2.about p { font-size: 23px; gap: 8px; }
body.portrait .desc .howto .ms, body.portrait .desc.about .ab em .ms { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; color: inherit; }
body.portrait .desc .howto .ms { font-size: 28px; }
body.portrait .slide:has(.gtitle .route) .gallery { top: 450px; }
body:not(.portrait) .slide:has(.gtitle .route) .gallery { top: 330px; } body:not(.portrait) .slide:has(.gtitle .route) .gtitle { top: 100px; }
.desc.center { bottom: 112px; }

/* long tables also flow (title → route → table); the card sits beside the table on a wide screen */
.tbl--dense { display: flex; flex-direction: column; padding: 110px 160px 0; }
.tbl--dense .tbl__head, .tbl--dense table, .tbl--dense .tbl__note { position: static; left: auto; right: auto; top: auto; bottom: auto; }
.tbl--dense table { margin-top: 18px; width: calc(100% - 560px); }
.tbl--dense .tbl__note { margin-top: 12px; width: calc(100% - 560px); }
.tbl--dense .desc { position: absolute; left: auto; right: 160px; width: 480px; bottom: auto; top: 330px; }
body.portrait .tbl--dense { padding: calc(210px + var(--pad, 0px) / 2) 56px 0; }
body.portrait .tbl--dense table, body.portrait .tbl--dense .tbl__note { width: 100%; }
body.portrait .tbl--dense .desc { position: static; width: auto; margin-top: 22px; }
body:not(.portrait) .dock { bottom: 46px; }

/* .tight: last step before lifting the card (fitDesc) — smaller title, steps and table rows */
.slide.tight .panel h1 { font-size: 52px; margin-top: 16px; }
.slide.tight .panel .sub { font-size: 22px; margin-top: 10px; }
.slide.tight .route { margin-top: 10px; }
.slide.tight .steps { margin-top: 18px; gap: 6px; }
.slide.tight .step { padding: 7px 16px 7px 10px; font-size: 20px; }
.slide.tight .step .ms { width: 36px; height: 36px; font-size: 22px; border-radius: 11px; }
.slide.tight .desc { margin-top: 16px; }
.slide.tight .tbl table { margin-top: 12px; }
.slide.tight .tbl td { padding-top: 9px; padding-bottom: 9px; }
.slide.tight .tbl__head h1 { font-size: 48px; }
.slide.nofx .panel *, .slide.nofx .tbl *, .slide.nofx .desc, .slide.nofx .desc * { transition: none !important; }
.slide.tight2 .panel h1 { font-size: 46px; }
.slide.tight2 .step { padding: 5px 14px 5px 8px; font-size: 18px; }
.slide.tight2 .step .ms { width: 32px; height: 32px; font-size: 20px; }
.slide.tight2 .steps { gap: 4px; margin-top: 14px; }
.slide.tight2 .tbl table { font-size: 18px; }
.slide.tight2 .tbl td { padding-top: 6px; padding-bottom: 6px; }
.slide.tight2 .tbl__head h1 { font-size: 40px; }
.slide.tight2 .tbl__head .sub { font-size: 20px; }
body.portrait .slide.tight .tbl table { font-size: 26px; }
body.portrait .slide.tight2 .tbl table { font-size: 23px; }
body.portrait .slide.tight2 .tbl--text td:first-child { font-size: 26px; }
body.portrait .slide.tight2 .tbl--text td:last-child { font-size: 23px; }

/* no blue tap flash or text selection on taps and long presses (the search field stays editable) */
html { -webkit-tap-highlight-color: transparent; }
#stage, #stage *, .dock, .dock *, .rechint, .toc { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.toc input { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
#stage img { -webkit-user-drag: none; }
