@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #07080a;
  --bg-2: #0b0c0f;
  --panel: #0e1013;
  --panel-2: #14161b;
  --line: rgba(var(--ink), .065);
  --line-2: rgba(var(--ink), .1);
  --line-3: rgba(var(--ink), .16);
  --tx: #f1f2f5;
  --tx-2: #a3a8b5;
  --tx-3: #646a78;
  --acc: #9aa6ff;
  --acc-2: #cdd3ff;
  --acc-glow: rgba(154, 166, 255, .16);
  --gold: #e9d3a2;
  --up: #2bd9a0;
  --dn: #ff5d73;
  --warn: #ffc24b;
  --up-bg: rgba(43, 217, 160, .1);
  --dn-bg: rgba(255, 93, 115, .1);
  --r: 14px;
  --hi: inset 0 1px 0 rgba(var(--ink), .045);
  --font: "Geist", "Pretendard Variable", Pretendard, "Hiragino Sans", "PingFang SC", "Noto Sans CJK", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --ink: 255, 255, 255;          /* overlays and hairlines are this colour at low alpha */
  --shade: 0, 0, 0;              /* shadows and wells */
  --bg-rgb: 7, 8, 10;
  --panel-rgb: 11, 12, 15;
  --btn-a: #ffffff; --btn-b: #e4e6ec; --btn-tx: #07080a;
  --chart-tx: #5d6372; --chart-grid: rgba(255,255,255,.028); --chart-cross: #3a3f4c; --chart-label: #1a1d24;
  color-scheme: dark;
}
/* Themes: dark (default, above), light, terminal (amber on black, monospace) and prism (neon on deep violet).
   Charts read the --chart-* and --up/--dn values when the theme changes (see js/theme.js). */
:root[data-theme="light"] {
  --bg: #f4f5f8; --bg-2: #eceef3; --panel: #ffffff; --panel-2: #f7f8fb;
  --line: rgba(15, 18, 30, .08); --line-2: rgba(15, 18, 30, .13); --line-3: rgba(15, 18, 30, .2);
  --tx: #11131a; --tx-2: #4b5161; --tx-3: #8a909f;
  --acc: #4f5bff; --acc-2: #3b46d9; --acc-glow: rgba(79, 91, 255, .14); --gold: #a77a1c;
  --up: #0c9f6f; --dn: #e23a52; --warn: #c98a00; --up-bg: rgba(12, 159, 111, .1); --dn-bg: rgba(226, 58, 82, .1);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .7);
  --ink: 15, 18, 30; --shade: 120, 128, 150; --bg-rgb: 244, 245, 248; --panel-rgb: 255, 255, 255;
  --btn-a: #1a1d27; --btn-b: #11131a; --btn-tx: #ffffff;
  --chart-tx: #6b7180; --chart-grid: rgba(15,18,30,.05); --chart-cross: #b7bcc8; --chart-label: #e6e8ee;
  color-scheme: light;
}
:root[data-theme="terminal"] {
  --bg: #000000; --bg-2: #050505; --panel: #070707; --panel-2: #0d0d0d;
  --line: rgba(255, 166, 0, .14); --line-2: rgba(255, 166, 0, .24); --line-3: rgba(255, 166, 0, .38);
  --tx: #ffb21a; --tx-2: #d99a2b; --tx-3: #8f6a2c;
  --acc: #ff8a00; --acc-2: #ffc35a; --acc-glow: rgba(255, 138, 0, .18); --gold: #ffd36b;
  --up: #2fe36d; --dn: #ff4040; --warn: #ffd000; --up-bg: rgba(47, 227, 109, .12); --dn-bg: rgba(255, 64, 64, .12);
  --hi: none; --r: 4px;
  --ink: 255, 166, 0; --shade: 0, 0, 0; --bg-rgb: 0, 0, 0; --panel-rgb: 7, 7, 7;
  --btn-a: #ff9f1a; --btn-b: #ff8a00; --btn-tx: #000000;
  --font: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --chart-tx: #b8862e; --chart-grid: rgba(255,166,0,.07); --chart-cross: #6b4d14; --chart-label: #2a1d05;
  color-scheme: dark;
}
:root[data-theme="terminal"] :lang(ko), :root[data-theme="terminal"]:lang(ko) { --font: "Geist Mono", "Pretendard Variable", ui-monospace, monospace; }
:root[data-theme="terminal"] .btn, :root[data-theme="terminal"] .modal, :root[data-theme="terminal"] .card, :root[data-theme="terminal"] .badge { border-radius: 3px; }
:root[data-theme="prism"] {
  --bg: #0a0618; --bg-2: #0f0a24; --panel: #120c2b; --panel-2: #1a1240;
  --line: rgba(190, 160, 255, .1); --line-2: rgba(190, 160, 255, .17); --line-3: rgba(190, 160, 255, .28);
  --tx: #f6f2ff; --tx-2: #b8acd9; --tx-3: #7d71a3;
  --acc: #b07cff; --acc-2: #e6d4ff; --acc-glow: rgba(176, 124, 255, .22); --gold: #ffd27a;
  --up: #31f2c4; --dn: #ff4fa3; --warn: #ffcf4a; --up-bg: rgba(49, 242, 196, .12); --dn-bg: rgba(255, 79, 163, .12);
  --ink: 220, 200, 255; --shade: 5, 0, 20; --bg-rgb: 10, 6, 24; --panel-rgb: 18, 12, 43;
  --btn-a: #ffffff; --btn-b: #e9dcff; --btn-tx: #1a0f3d;
  --chart-tx: #8a7fb3; --chart-grid: rgba(190,160,255,.05); --chart-cross: #4b3d80; --chart-label: #241a52;
  color-scheme: dark;
}
:root[data-theme="prism"] body { background:
  radial-gradient(900px 500px at 8% -10%, rgba(255, 79, 163, .14), transparent 60%),
  radial-gradient(800px 520px at 100% 0%, rgba(49, 242, 196, .10), transparent 60%),
  radial-gradient(900px 700px at 50% 120%, rgba(124, 92, 255, .16), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="prism"] .btn.accent, :root[data-theme="prism"] .btn.primary { background: var(--btn-a); color: var(--btn-tx); border-color: transparent; }
:lang(ko) { --font: "Pretendard Variable", Pretendard, "Geist", "Apple SD Gothic Neo", ui-sans-serif, system-ui, sans-serif; }
:lang(ja) { --font: "Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
:lang(zh-Hans) { --font: "Geist", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html.i18n-pending body { visibility: hidden; }
html, body { background: var(--bg); color: var(--tx); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); } .dn { color: var(--dn); } .muted { color: var(--tx-2); } .faint { color: var(--tx-3); }
::selection { background: var(--acc-glow); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(var(--ink), .08); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px; height: 60px; padding: 0 28px;
  background: rgba(var(--bg-rgb), .7); backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 15px; }
.logo i { width: 20px; height: 20px; border-radius: 6px; position: relative; background: linear-gradient(140deg, #f1f2f5 0%, #9aa6ff 55%, #2b2f45 100%);
  box-shadow: 0 0 0 1px rgba(var(--ink), .12) inset, 0 6px 18px rgba(154,166,255,.25); }
.logo i::after { content: ""; position: absolute; inset: 5px 5px 5px 9px; border-radius: 2px; background: var(--bg); }
.nav .links { display: flex; gap: 24px; color: var(--tx-3); font-size: 13.5px; }
.nav .links a { transition: color .15s; }
.nav .links a:hover, .nav .links a.on { color: var(--tx); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { position: relative; }
.lang .caret { margin-left: 4px; font-size: 9px; color: var(--tx-3); }
.lang-menu { position: absolute; right: 0; top: 38px; min-width: 150px; padding: 6px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(var(--shade), .5); display: grid; z-index: 40; }
.lang-menu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 13px; color: var(--tx-2); }
.lang-menu button:hover, .lang-menu button.on { background: rgba(var(--ink), .05); color: var(--tx); }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(var(--ink), .03); cursor: pointer; font-weight: 500; font-size: 13.5px;
  transition: background .15s, border-color .15s, color .15s, transform .12s cubic-bezier(.23, 1, .32, 1); white-space: nowrap; }
.btn:hover { border-color: var(--line-3); background: rgba(var(--ink), .06); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--btn-a); color: var(--btn-tx); border-color: transparent; }
.btn.primary:hover { filter: brightness(.94); }
.btn.accent { background: var(--acc); color: #0b0c14; border-color: transparent; }
.btn.accent:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx-2); box-shadow: none; }
.btn.ghost:hover { color: var(--tx); background: rgba(var(--ink), .05); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 11.5px; color: var(--tx-3); letter-spacing: .01em; }
.input, select.input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(var(--shade), .35); outline: none;
  transition: border-color .15s, box-shadow .15s; width: 100%; }
.input:focus { border-color: rgba(154,166,255,.6); box-shadow: 0 0 0 3px var(--acc-glow); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(var(--shade), .35); border: 1px solid var(--line); }
.seg.full { display: flex; } .seg.full button { flex: 1; }
.seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--tx-3); cursor: pointer; font-size: 12.5px; font-weight: 500; transition: color .15s; }
.seg button:hover { color: var(--tx-2); }
.seg button.on { background: rgba(var(--ink), .08); color: var(--tx); box-shadow: var(--hi), 0 1px 2px rgba(var(--shade), .4); }

.card { background: linear-gradient(180deg, rgba(var(--ink), .022), rgba(var(--ink), .008)), var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--hi); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: rgba(var(--ink), .04); border: 1px solid var(--line-2); color: var(--tx-2); white-space: nowrap; }
.badge.acc { color: var(--acc-2); border-color: rgba(154,166,255,.3); background: rgba(154,166,255,.07); }
.badge.gold { color: var(--gold); border-color: rgba(233,211,162,.28); background: rgba(233,211,162,.06); }
.badge.up { color: var(--up); border-color: rgba(43,217,160,.28); background: var(--up-bg); }
.badge.dn { color: var(--dn); border-color: rgba(255,93,115,.28); background: var(--dn-bg); }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 5px; font-style: normal;
  font: 500 10.5px var(--mono); color: var(--tx-2); background: rgba(var(--ink), .04); border: 1px solid var(--line-2); border-bottom-width: 2px; }

/* ---- modal / toast ---- */
.veil { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(3, 4, 6, .7); backdrop-filter: blur(8px); animation: fade .15s ease; }
.modal { width: min(460px, calc(100vw - 32px)); padding: 28px; border-radius: 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px rgba(var(--shade), .65), var(--hi); animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.modal h3 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 6px; }
.modal p { color: var(--tx-2); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px;
  background: rgba(20,22,27,.92); backdrop-filter: blur(10px); border: 1px solid var(--line-2); box-shadow: 0 12px 40px rgba(var(--shade), .5); font-size: 13px; animation: rise .2s ease; --tx-x: -50%; }
@keyframes fade { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx-x, 0), 8px) } }

/* ---- page shell ---- */
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 28px; }
.eyebrow { font: 500 11.5px var(--mono); color: var(--tx-3); letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { letter-spacing: -.03em; font-weight: 600; }
:lang(ko) h1, :lang(ko) h2, :lang(ja) h1, :lang(ja) h2, :lang(zh-Hans) h1, :lang(zh-Hans) h2 { letter-spacing: -.02em; word-break: keep-all; }

@media (max-width: 760px) {
  .nav { padding: 0 16px; gap: 14px; } .nav .links { display: none; } .nav .right .badge { display: none; }
  .wrap { padding-inline: 16px; }
}

/* ---- region notice (exchange blocks this region) ---- */
.geo { position: sticky; top: 0; z-index: 70; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px;
  padding: 11px 16px; text-align: center; font-size: 13.5px; line-height: 1.5;
  background: #3a1d22; color: #ffd9de; border-bottom: 1px solid rgba(255,120,140,.35); }
.geo b { font-weight: 600; }
.geo span { color: rgba(255,217,222,.75); }
:lang(ko) .geo { word-break: keep-all; }
.themebtn { width: 32px; padding: 0; justify-content: center; }
.themebtn .tdot, .tsw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-3); }
.themebtn .tdot { background: conic-gradient(var(--up), var(--acc), var(--dn), var(--up)); }
.theme-menu button { display: flex; align-items: center; gap: 9px; }
.tsw-dark { background: linear-gradient(135deg, #07080a 50%, #9aa6ff 50%); }
.tsw-light { background: linear-gradient(135deg, #ffffff 50%, #4f5bff 50%); }
.tsw-terminal { background: linear-gradient(135deg, #000 50%, #ffb21a 50%); }
.tsw-prism { background: linear-gradient(135deg, #ff6fb5, #b07cff, #49e9ff); }
/* help button and contact form */
.helpfab { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(var(--panel-rgb), .92); backdrop-filter: blur(10px); color: var(--tx-2); cursor: pointer; box-shadow: 0 8px 24px rgba(var(--shade), .35); font-size: 12.5px; }
.helpfab span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--acc-glow); color: var(--acc-2); font-weight: 700; }
.helpfab:hover { color: var(--tx); border-color: var(--line-3); }
.term ~ .helpfab { left: 10px; right: auto; bottom: 10px; height: 30px; padding: 0 10px 0 3px; font-size: 11.5px; }
.term ~ .helpfab span { width: 24px; height: 24px; }
.helpfab b { font-weight: 500; }
@media (max-width: 720px) { .helpfab b { display: none; } .helpfab { padding: 0 6px; } }
.helpkind { flex-wrap: wrap; }
/* rich text and image strips used by shared strategies and indicators */
.rich { color: var(--tx-2); font-size: 14.5px; line-height: 1.75; }
.rich p { margin: 0 0 12px; } .rich h3, .rich h4, .rich h5 { color: var(--tx); margin: 18px 0 8px; letter-spacing: -.01em; }
.rich ul { margin: 0 0 12px 18px; } .rich li { margin: 3px 0; }
.rich code { font-family: var(--mono); font-size: .9em; padding: 1px 5px; border-radius: 5px; background: rgba(var(--ink), .07); color: var(--tx); }
.rich blockquote { margin: 0 0 12px; padding: 4px 0 4px 12px; border-left: 2px solid var(--acc); color: var(--tx-2); }
.rich b { color: var(--tx); }
.imgpick { display: flex; flex-wrap: wrap; gap: 8px; }
.imgpick .th { position: relative; width: 104px; height: 66px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-2); }
.imgpick .th img { width: 100%; height: 100%; object-fit: cover; }
.imgpick .th button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(var(--shade), .7); color: #fff; cursor: pointer; font-size: 10px; }
.imgpick .add { display: grid; place-items: center; width: 104px; height: 66px; border-radius: 9px; border: 1px dashed var(--line-3); color: var(--tx-3); cursor: pointer; font-size: 12px; background: transparent; }
.imgpick .add:hover { color: var(--tx); border-color: var(--acc); }
