/* Easy Game Translator — tutorial styles (no external resources) */
:root {
  --navy: #1c1f44; --navy-2: #22265a; --navy-3: #2a2f6b; --ink: #12142e;
  --card: rgba(255, 255, 255, .045); --line: rgba(255, 255, 255, .09);
  --tx: #e9ebff; --tx-2: #b7bce6; --tx-3: #8d93c9;
  --violet: #7c5cff; --cyan: #38bdf8; --pink: #ff4d8d; --green: #34d399; --gold: #ffc43d;
  --grad: linear-gradient(135deg, #7c5cff 0%, #38bdf8 100%);
  --r: 18px; --shadow: 0 18px 50px rgba(5, 6, 25, .45);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}
:lang(ja) { --font: 'Nunito', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Noto Sans CJK JP', 'Noto Sans JP', sans-serif }
:lang(ko) { --font: 'Nunito', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans CJK KR', 'Noto Sans KR', sans-serif }
:lang(zh-CN) { --font: 'Nunito', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif }
:lang(zh-TW) { --font: 'Nunito', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans CJK TC', 'Noto Sans TC', sans-serif }
:lang(ar) { --font: 'Segoe UI', 'Noto Sans Arabic', 'Noto Naskh Arabic', Tahoma, 'Geeza Pro', sans-serif }
:lang(hi) { --font: 'Nunito', 'Nirmala UI', 'Noto Sans Devanagari', 'Mangal', sans-serif }
:lang(th) { --font: 'Nunito', 'Leelawadee UI', 'Noto Sans Thai', 'Thonburi', sans-serif }

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100% }
body {
  margin: 0; font-family: var(--font); color: var(--tx); line-height: 1.7; font-size: 17px;
  background: var(--navy); background-image: radial-gradient(1200px 600px at 85% -10%, rgba(124, 92, 255, .25), transparent 60%), radial-gradient(900px 500px at -10% 20%, rgba(56, 189, 248, .12), transparent 60%);
  background-attachment: fixed; overflow-x: hidden;
}
:lang(ja) body, :lang(zh-CN) body, :lang(zh-TW) body, :lang(ko) body { line-height: 1.85 }
img { max-width: 100%; height: auto }
a { color: #8fd8ff; text-underline-offset: 3px }
a:hover { color: #fff }
b, strong { color: #fff; font-weight: 800 }
code { font-family: ui-monospace, 'Cascadia Code', 'DejaVu Sans Mono', Consolas, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); padding: .1em .4em; border-radius: 6px; color: #ffd6e6; unicode-bidi: plaintext }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100 }
.skip:focus { top: 8px }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(22, 25, 58, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) }
.topbar-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 20px }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; margin-inline-end: auto; white-space: nowrap }
.brand img { border-radius: 9px }
.brand em { font-style: normal; font-size: 12px; background: var(--grad); padding: 2px 8px; border-radius: 99px; margin-inline-start: 4px; vertical-align: 2px }
.lang-pick { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px 4px 10px }
.lang-pick select { background: transparent; color: #fff; border: 0; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; padding: 4px 2px; max-width: 46vw }
.lang-pick select option { background: var(--navy-2); color: #fff }
.toc-toggle { display: none; background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer }

/* ---------- hero */
.hero { position: relative; overflow: hidden; padding: 64px 20px 48px; border-bottom: 1px solid var(--line) }
.stars { position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff7, transparent), radial-gradient(1.5px 1.5px at 40% 80%, #fff5, transparent), radial-gradient(1px 1px at 90% 60%, #fff8, transparent), radial-gradient(1px 1px at 10% 70%, #fff6, transparent), radial-gradient(1.2px 1.2px at 55% 45%, #fff5, transparent); opacity: .7; animation: twinkle 6s ease-in-out infinite alternate; pointer-events: none }
@keyframes twinkle { to { opacity: .35 } }
.hero-in { position: relative; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 44px; align-items: center }
.pill { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: #dff4ff; background: rgba(56, 189, 248, .14); border: 1px solid rgba(56, 189, 248, .35); padding: 4px 12px; border-radius: 99px }
h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.12; margin: 16px 0 14px; font-weight: 800; letter-spacing: -.01em; background: linear-gradient(90deg, #fff 0%, #cfe9ff 55%, #ffc2dc 100%); -webkit-background-clip: text; background-clip: text; color: transparent }
.lead { font-size: 19px; color: var(--tx-2); margin: 0 0 24px; max-width: 40em }
.hero-art { position: relative }
.game-frame { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow), 0 0 0 6px rgba(124, 92, 255, .12); background: #0d0f26; transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transition: transform .5s ease }
[dir=rtl] .game-frame { transform: perspective(1400px) rotateY(6deg) rotateX(2deg) }
.game-frame:hover { transform: none }
.game-bar { display: flex; gap: 6px; padding: 9px 12px; background: #15183c; border-bottom: 1px solid var(--line) }
.game-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57 } .game-bar i:nth-child(2) { background: #febc2e } .game-bar i:nth-child(3) { background: #28c840 }
.game-frame img { display: block; width: 100% }
.hero-nina { position: absolute; width: 170px; inset-inline-end: -18px; bottom: -42px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .45)); animation: float 5s ease-in-out infinite }
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg) } }

/* ---------- downloads */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
.dl-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: transform .15s ease, background .2s, border-color .2s }
.dl-card:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff }
.dl-card.primary { background: var(--grad); border-color: transparent; box-shadow: 0 10px 26px rgba(124, 92, 255, .35) }
.dl-os { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, .18) }
.dl-os svg { width: 20px; height: 20px }
.dl-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0 }
.dl-tx b { font-size: 15px } .dl-tx small { font-size: 12.5px; color: rgba(255, 255, 255, .78) }
.dl-arrow { margin-inline-start: auto; font-weight: 800; opacity: .8 }
.dl-note { font-size: 14px; color: var(--tx-3); margin: 12px 0 0 }
.sec .dl-wrap { margin: 8px 0 26px }

/* ---------- layout */
.layout { max-width: 1280px; margin: 0 auto; padding: 36px 20px 40px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start }
.toc { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; scrollbar-width: thin }
.toc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 12px 12px }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-3); margin: 0 10px 8px }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc }
.toc li { counter-increment: toc }
.toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--tx-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; transition: background .2s, color .2s }
.toc a::before { content: counter(toc); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: rgba(255, 255, 255, .07); color: var(--tx-3) }
.toc a:hover { background: rgba(255, 255, 255, .06); color: #fff }
.toc a.on { background: rgba(124, 92, 255, .2); color: #fff }
.toc a.on::before { background: var(--grad); color: #fff }

/* ---------- sections */
.content { min-width: 0; outline: none }
.sec { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .025)); border: 1px solid var(--line); border-radius: 24px; padding: 30px 34px; margin-bottom: 28px; box-shadow: 0 10px 30px rgba(5, 6, 25, .2); opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease }
.sec.in { opacity: 1; transform: none }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px }
.sec-ic { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line) }
.sec-ic.num { background: var(--grad); font-weight: 800; font-size: 26px; color: #fff; border: 0; box-shadow: 0 8px 22px rgba(124, 92, 255, .4) }
.sec-ic img { width: 44px; height: 44px }
.sec-kicker { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan) }
.sec-kicker:empty { display: none }
.sec h2 { margin: 0; font-size: clamp(24px, 2.6vw, 31px); line-height: 1.25; font-weight: 800 }
.sec h3 { font-size: 21px; margin: 30px 0 6px; padding-inline-start: 14px; border-inline-start: 4px solid var(--violet); line-height: 1.35 }
.sec p { margin: 12px 0; color: var(--tx) }
ul.nice, ol.steps { padding: 0; margin: 14px 0; list-style: none }
ul.nice li { position: relative; padding-inline-start: 28px; margin: 9px 0 }
ul.nice li::before { content: ''; position: absolute; inset-inline-start: 6px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); transform: rotate(45deg) }
ol.steps { counter-reset: st }
ol.steps li { counter-increment: st; position: relative; padding-inline-start: 46px; margin: 14px 0; min-height: 32px }
ol.steps li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: rgba(124, 92, 255, .22); border: 1px solid rgba(124, 92, 255, .5); color: #fff }
ol.legend { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px }
ol.legend li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; padding: 6px 0 }
ol.legend .num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 0 0 2px #fff inset; margin-top: 1px }

/* figures */
.shot { margin: 22px 0; opacity: 0; transform: scale(.985); transition: opacity .6s ease .05s, transform .6s ease .05s }
.shot.in { opacity: 1; transform: none }
.shot-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow); background: #0f1130; cursor: zoom-in }
.shot-frame img { display: block; width: 100%; transition: transform .35s ease }
.shot-frame:hover img { transform: scale(1.012) }
.zoom { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(10, 12, 35, .7); color: #fff; font-size: 18px; opacity: 0; transition: opacity .2s; pointer-events: none }
.shot-frame:hover .zoom { opacity: 1 }
.shot figcaption { font-size: 14.5px; color: var(--tx-3); margin-top: 10px; text-align: center }

/* callouts */
.callout { display: flex; gap: 14px; padding: 14px 18px; border-radius: 14px; margin: 18px 0; border: 1px solid; line-height: 1.6 }
.callout-ic { font-size: 20px; line-height: 1.5 }
.callout-body { min-width: 0 }
.callout.tip { background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .35) }
.callout.warn { background: rgba(255, 196, 61, .09); border-color: rgba(255, 196, 61, .4) }
.callout.note { background: rgba(56, 189, 248, .09); border-color: rgba(56, 189, 248, .38) }

/* code */
pre.code { position: relative; direction: ltr; text-align: left; background: #0c0e26; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; padding-right: 86px; overflow-x: auto; margin: 10px 0 16px }
pre.code code { background: none; padding: 0; color: #c9f2ff; font-size: 14.5px; line-height: 1.7; white-space: pre }
.copy { position: absolute; top: 9px; right: 9px; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 700; padding: 4px 10px; cursor: pointer }
.copy:hover { background: rgba(255, 255, 255, .16) }

/* do / don't */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 }
.dd { border-radius: 14px; padding: 14px 18px; border: 1px solid }
.dd.do { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .32) }
.dd.dont { background: rgba(255, 77, 141, .08); border-color: rgba(255, 77, 141, .32) }
.dd h4 { margin: 0 0 6px; font-size: 16px }
.dd ul { margin: 0; padding-inline-start: 20px }
.dd li { margin: 6px 0; font-size: 15.5px }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); margin: 10px 0; overflow: hidden }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 800; list-style: none; display: flex; gap: 12px; align-items: center }
.faq summary::-webkit-details-marker { display: none }
.faq summary::before { content: '+'; flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(124, 92, 255, .25); transition: transform .2s }
.faq details[open] summary::before { content: '–'; background: var(--grad) }
.faq-a { padding: 0 18px 14px 54px; color: var(--tx-2) }
[dir=rtl] .faq-a { padding: 0 54px 14px 18px }
.sign { font-weight: 800; font-size: 19px; color: #ffd0e2 }

/* footer */
.foot { text-align: center; padding: 30px 20px 50px; color: var(--tx-3); border-top: 1px solid var(--line) }
.foot img { width: 210px; margin-bottom: 8px }
.foot p { margin: 6px auto; max-width: 720px }
.foot-small { font-size: 13.5px }

.to-top { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--grad); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; z-index: 30 }
.to-top.show { opacity: 1; transform: none; pointer-events: auto }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(6, 7, 22, .9); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 30px; opacity: 0; transition: opacity .18s }
.lightbox.open { opacity: 1 }
.lightbox[hidden] { display: none }
.lightbox figure { margin: 0; max-width: min(1500px, 96vw) }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; display: block; border-radius: 12px; box-shadow: var(--shadow) }
.lightbox figcaption { text-align: center; color: var(--tx-2); margin-top: 12px }
.lb-close { position: absolute; top: 16px; inset-inline-end: 18px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: #fff; font-size: 18px; cursor: pointer }

/* responsive */
@media (max-width: 1060px) {
  .layout { grid-template-columns: minmax(0, 1fr) }
  .toc-toggle { display: inline-block }
  .toc { position: fixed; top: 60px; inset-inline: 12px; max-height: calc(100vh - 80px); z-index: 50; display: none }
  .toc-card { background: #23275c; box-shadow: var(--shadow) }
  body.toc-open .toc { display: block }
}
@media (max-width: 900px) {
  .hero { padding-top: 40px }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 34px }
  .game-frame { transform: none } [dir=rtl] .game-frame { transform: none }
  .hero-nina { width: 120px; bottom: -30px; inset-inline-end: -6px }
}
@media (max-width: 640px) {
  body { font-size: 16px }
  .topbar-in { padding: 8px 12px; gap: 8px }
  .brand span { display: none }
  .sec { padding: 22px 16px; border-radius: 18px }
  .sec-ic { width: 46px; height: 46px; font-size: 22px; border-radius: 14px }
  .dl-grid, .dodont, ol.legend { grid-template-columns: minmax(0, 1fr) }
  .lead { font-size: 17px }
  .faq-a { padding: 0 16px 14px } [dir=rtl] .faq-a { padding: 0 16px 14px }
  .layout { padding: 22px 12px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
  .sec, .shot { opacity: 1; transform: none }
}
@media print { .topbar, .toc, .to-top, .hero-art { display: none } .sec { opacity: 1; transform: none; break-inside: avoid-page } body { background: #fff; color: #000 } }
