/* ==========================================================================
   YURA TECH Web Brochure — viewer chrome (16:9 stage, 1920 × 1080 base)
   ========================================================================== */
:root {
  --v-bg: #121214;
  --v-bg-2: #1A1A1D;
  --v-panel: #222226;
  --v-panel-2: #2B2B30;
  --v-line: rgba(255,255,255,.09);
  --v-text: #F3F2EF;
  --v-muted: #8E8C93;
  --v-dim: #5F5D64;
  --v-red: #E23235;
  --v-red-d: #B5161C;
  --f-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --f-num: 'Barlow Condensed', 'Pretendard Variable', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--v-bg); color: var(--v-text); font-family: var(--f-sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(ellipse 70% 62% at 50% 50%, #26262A 0%, #18181B 55%, #101012 100%); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---------- stage (scaled as a whole) ---------- */
.stage-wrap { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.stage-wrap > #stage { pointer-events: none; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; pointer-events: none; }
#stage > * { pointer-events: auto; }

/* header */
.top { position: absolute; left: 0; top: 0; width: 1920px; height: 76px; display: flex; align-items: center; padding: 0 40px; border-bottom: 1px solid var(--v-line); }
.brand { display: flex; align-items: center; gap: 18px; min-width: 420px; }
.brand .yb-logo { height: 30px; width: auto; display: block; }
.brand .yb-logo .lr { fill: var(--v-red); } .brand .yb-logo .lk { fill: #fff; }
.brand i { width: 1px; height: 22px; background: var(--v-line); }
.brand span { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--v-muted); }
.brand span b { color: var(--v-text); font-family: var(--f-num); font-weight: 600; font-size: 16px; letter-spacing: .04em; margin-left: 4px; }
.crumb { flex: 1; text-align: center; font-size: 14px; color: var(--v-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 20px; }
.crumb b { color: var(--v-text); font-weight: 600; }
.crumb em { font-style: normal; color: var(--v-dim); margin: 0 10px; }
.crumb .no { font-family: var(--f-num); font-weight: 600; color: var(--v-red); margin-right: 8px; font-size: 16px; }
.tools { display: flex; align-items: center; gap: 6px; min-width: 420px; justify-content: flex-end; }
.tbtn { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #CFCDD2; transition: background .15s, color .15s; position: relative; }
.tbtn:hover { background: rgba(255,255,255,.07); color: #fff; }
.tbtn.on { color: #fff; background: var(--v-red); }
.tbtn[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: 50px; left: 50%; transform: translateX(-50%); background: #000; color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 10; }
.seg { display: flex; padding: 3px; background: rgba(255,255,255,.06); border-radius: 10px; margin: 0 8px; }
.seg button { height: 34px; min-width: 44px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--v-muted); }
.seg button.on { background: #fff; color: #111; }
.sep { width: 1px; height: 24px; background: var(--v-line); margin: 0 6px; }

/* left contents rail */
.toc { position: absolute; left: 40px; top: 116px; width: 270px; height: 830px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; padding-right: 8px; }
.toc h2 { margin: 0 0 18px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--v-dim); }
.toc a { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px; text-decoration: none; color: var(--v-muted); cursor: pointer; }
.toc .t1 { padding: 11px 0; border-top: 1px solid var(--v-line); font-size: 15px; font-weight: 650; color: #D9D7DC; }
.toc .t1 .n { font-family: var(--f-num); color: var(--v-red); font-weight: 700; margin-right: 8px; font-size: 17px; }
.toc .t1.on { color: #fff; }
.toc .t2 { position: relative; padding: 6px 0 6px 16px; font-size: 13px; line-height: 1.35; }
.toc .t2::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: transparent; border-radius: 2px; }
.toc .t2:hover, .toc .t1:hover { color: #fff; }
.toc .t2.on { color: #fff; }
.toc .t2.on::before { background: var(--v-red); }
.toc .pn { font-family: var(--f-num); font-weight: 600; font-size: 14px; color: var(--v-dim); }
.toc .sub { display: none; padding: 2px 0 10px; }
.toc .open + .sub { display: block; }
.toc .grp { margin: 8px 0 2px 16px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--v-dim); }

/* book frame & shadow (in stage coordinates) */
.book-shadow { position: absolute; left: 365px; top: 100px; width: 1190px; height: 842px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.65), 0 10px 30px rgba(0,0,0,.35); transition: left .5s, width .5s; pointer-events: none; }
.state-front .book-shadow { left: 960px; width: 595px; }
.state-back .book-shadow { width: 595px; }

/* index tabs on the fore-edge */
.tabs { position: absolute; left: 1555px; top: 150px; display: flex; flex-direction: column; gap: 6px; }
.tabs button { width: 40px; height: 112px; border-radius: 0 9px 9px 0; background: #2A2A2F; color: #A9A7AE; writing-mode: vertical-rl; font-size: 13px; font-weight: 700; letter-spacing: .08em; transition: background .2s, color .2s, width .2s; display: flex; align-items: center; justify-content: center; }
.tabs button:hover { background: #3A3A40; color: #fff; width: 46px; }
.tabs button.on { background: var(--v-red); color: #fff; width: 46px; }
.state-back .tabs { left: 960px; }

/* right rail: share-to-phone card */
.side { position: absolute; left: 1640px; top: 640px; width: 240px; }
.side .card { background: rgba(255,255,255,.04); border: 1px solid var(--v-line); border-radius: 14px; padding: 18px; }
.side .qr { width: 132px; height: 132px; background: #fff; padding: 8px; border-radius: 6px; }
.side .qr svg { width: 100%; height: 100%; display: block; }
.side p { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--v-muted); }
.side p b { display: block; color: var(--v-text); font-size: 13.5px; margin-bottom: 2px; }
.side .mail { margin-top: 14px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--v-red); color: #fff; font-size: 13px; font-weight: 700; width: 100%; justify-content: center; }
.side .mail:hover { background: #F0383C; }
.side .mail[hidden] { display: none; }
.hint { position: absolute; left: 1640px; top: 116px; width: 240px; font-size: 12px; line-height: 1.6; color: var(--v-dim); }
.hint kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid #3A3A40; border-bottom-width: 2px; border-radius: 5px; font-family: var(--f-sans); font-size: 11px; color: var(--v-muted); text-align: center; margin: 0 2px; }

/* bottom: thumbnails + nav */
.bottom { position: absolute; left: 0; top: 962px; width: 1920px; height: 118px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.nav { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #fff; transition: background .15s, opacity .2s; flex: none; }
.nav:hover { background: var(--v-red); }
.nav[disabled] { opacity: .25; pointer-events: none; }
.nav svg.ic { width: 24px; height: 24px; }
.thumbs { width: 1250px; height: 96px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; display: flex; align-items: center; gap: 12px; padding: 0 6px; scroll-behavior: smooth; mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.thumbs::-webkit-scrollbar { display: none; }
.th { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.th .sp { display: flex; outline: 2px solid transparent; outline-offset: 3px; border-radius: 2px; transition: outline-color .2s, transform .2s; }
.th:hover .sp { transform: translateY(-3px); }
.th.on .sp { outline-color: var(--v-red); }
.th .mini { width: 40px; height: 56.6px; overflow: hidden; position: relative; background: #fff; }
.th .mini .pg { transform: scale(.06723); position: absolute; left: 0; top: 0; pointer-events: none; }
.th .mini.blank { background: transparent; }
.th span { font-family: var(--f-num); font-size: 12px; font-weight: 600; color: var(--v-dim); letter-spacing: .04em; }
.th.on span { color: #fff; }
.count { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); font-family: var(--f-num); font-weight: 600; font-size: 22px; letter-spacing: .04em; color: #fff; }
.count small { color: var(--v-dim); font-size: 16px; margin-left: 6px; }
.edition { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--v-dim); letter-spacing: .04em; }

/* ---------- book layer (screen px, not scaled) ---------- */
#bookLayer { position: absolute; z-index: 5; }
#book { width: 100%; height: 100%; }
#book .page { background: #fff; overflow: hidden; }
#book .page .pg { position: absolute; left: 0; top: 0; transform: scale(var(--ps, 1)); }
#book .page.--hard { background: #fff; }
.stf__parent { touch-action: pan-y; }

/* ---------- overlays ---------- */
.ovl { position: fixed; inset: 0; z-index: 50; background: rgba(8,8,10,.72); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.ovl.show { display: flex; }
.panel { width: min(640px, calc(100vw - 32px)); background: #1E1E22; border: 1px solid var(--v-line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.panel header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 14px 22px; border-bottom: 1px solid var(--v-line); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--v-muted); }
.panel header button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--v-muted); }
.panel header button:hover { background: rgba(255,255,255,.07); color: #fff; }
.panel .body { padding: 20px 22px 22px; }
.sbox { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--v-line); }
.sbox input { flex: 1; height: 100%; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; font-size: 18px; }
.sbox input::placeholder { color: var(--v-dim); }
.sres { max-height: 52vh; overflow-y: auto; padding: 8px; }
.sres button { width: 100%; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 10px; text-align: left; }
.sres button:hover, .sres button.on { background: rgba(255,255,255,.06); }
.sres .im { width: 56px; height: 44px; background: #F2F1EE; border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.sres .im img { max-width: 48px; max-height: 38px; mix-blend-mode: multiply; }
.sres b { display: block; font-size: 14.5px; font-weight: 650; color: #fff; }
.sres small { display: block; font-size: 12px; color: var(--v-muted); margin-top: 2px; }
.sres .p { font-family: var(--f-num); font-size: 15px; color: var(--v-dim); font-weight: 600; }
.sres .empty { padding: 26px; text-align: center; color: var(--v-muted); font-size: 14px; }
.share-grid { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
.share-grid .qr { width: 180px; height: 180px; background: #fff; padding: 10px; border-radius: 8px; }
.share-grid .qr svg { width: 100%; height: 100%; }
.field { display: flex; gap: 8px; margin-top: 10px; }
.field input { flex: 1; min-width: 0; height: 42px; border-radius: 10px; border: 1px solid var(--v-line); background: #141417; color: #fff; padding: 0 12px; font: inherit; font-size: 13px; }
.btn { height: 42px; padding: 0 16px; border-radius: 10px; background: var(--v-red); color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.btn:hover { background: #F0383C; }
.btn.ghost { background: rgba(255,255,255,.07); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.muted { color: var(--v-muted); font-size: 13px; line-height: 1.6; margin: 0; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--v-line); margin-bottom: 10px; text-align: left; }
.opt:hover { border-color: var(--v-red); background: rgba(226,50,53,.08); }
.opt b { display: block; font-size: 15px; }
.opt small { display: block; color: var(--v-muted); font-size: 12.5px; margin-top: 2px; }
.opt .ico { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; place-items: center; flex: none; }

/* zoom overlay */
#zoom { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,12,.96); display: none; overflow: auto; }
#zoom.show { display: block; }
#zoom .zin { display: flex; justify-content: center; gap: 0; padding: 70px 20px 40px; }
#zoom .zp { position: relative; overflow: hidden; background: #fff; flex: none; }
#zoom .zp .pg { position: absolute; left: 0; top: 0; }
#zoom .zclose { position: fixed; top: 16px; right: 20px; z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; }
#zoom .zclose:hover { background: var(--v-red); }
#zoom .zbar { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; background: rgba(0,0,0,.6); padding: 4px; border-radius: 10px; }
#zoom .zbar button { height: 34px; padding: 0 12px; border-radius: 7px; color: #ddd; font-size: 13px; font-weight: 700; }
#zoom .zbar button.on, #zoom .zbar button:hover { background: rgba(255,255,255,.12); color: #fff; }

/* toast, loading, preview badge */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: #fff; color: #111; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: .25s; z-index: 80; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#loading { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--v-bg); transition: opacity .5s; }
#loading.done { opacity: 0; pointer-events: none; }
#loading .lw { width: 220px; text-align: center; }
#loading .yb-logo { width: 180px; height: auto; }
#loading .yb-logo .lr { fill: var(--v-red); } #loading .yb-logo .lk { fill: #fff; }
#loading .bar { margin-top: 26px; height: 2px; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
#loading .bar i { display: block; height: 100%; width: 40%; background: var(--v-red); animation: ld 1.1s ease-in-out infinite; }
@keyframes ld { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
#loading .err { margin-top: 18px; color: var(--v-muted); font-size: 13px; line-height: 1.6; }
.preview-badge { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 70; background: #F5B700; color: #111; font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 6px 14px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }

/* ---------- mobile / portrait ---------- */
.mbar, .mnav, .drawer { display: none; }
body.m .stage-wrap { display: none; }
body.m .mbar { display: flex; position: fixed; left: 0; right: 0; top: 0; height: 54px; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; border-bottom: 1px solid var(--v-line); background: rgba(18,18,20,.9); z-index: 20; }
.mbar .yb-logo { height: 22px; width: auto; }
.mbar .yb-logo .lr { fill: var(--v-red); } .mbar .yb-logo .lk { fill: #fff; }
.mbar .r { display: flex; align-items: center; gap: 2px; }
.mbar .seg { margin: 0 4px; }
.mbar .seg button { height: 30px; min-width: 38px; font-size: 12px; }
body.m .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 62px; align-items: center; justify-content: space-between; padding: 0 12px; border-top: 1px solid var(--v-line); background: rgba(18,18,20,.92); z-index: 20; }
.mnav .nav { width: 44px; height: 44px; }
.mnav .mid { text-align: center; min-width: 0; flex: 1; padding: 0 10px; }
.mnav .mid b { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnav .mid small { font-family: var(--f-num); font-size: 14px; color: var(--v-muted); }
.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); }
.drawer.show { display: block; }
.drawer .in { position: absolute; left: 0; top: 0; bottom: 0; width: min(330px, 86vw); background: #18181B; padding: 20px 18px; overflow-y: auto; }
.drawer .toc { position: static; width: auto; height: auto; overflow: visible; padding: 0; }
.drawer .toc .sub { display: block; }

@media (hover: none) { .tbtn[data-tip]:hover::after { display: none; } }

/* zoom view: previous / next spread */
#zoom .znav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 2; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; transition: background .15s, opacity .2s; }
#zoom .znav:hover { background: var(--v-red); }
#zoom .znav[disabled] { opacity: .2; pointer-events: none; }
#zoom .zprev { left: 20px; }
#zoom .znext { right: 20px; }
#zoom .znav svg.ic { width: 26px; height: 26px; }
#zoom .zcount { display: flex; align-items: baseline; gap: 2px; padding: 0 10px 0 12px; margin-left: 4px; border-left: 1px solid rgba(255,255,255,.15); font-family: var(--f-num); font-size: 16px; font-weight: 600; color: #fff; line-height: 34px; }
#zoom .zcount small { color: #8E8C93; font-size: 13px; }
@media (max-width: 900px) { #zoom .znav { width: 44px; height: 44px; background: rgba(0,0,0,.55); } #zoom .zprev { left: 8px; } #zoom .znext { right: 8px; } }
