:root {
	--pg-card: #191b22;
	--pg-card-2: #20232d;
	--pg-line: #34384a;
	--pg-line-soft: #2a2d3a;
	--pg-text: #eef0fa;
	--pg-muted: #c3c7dc;
	--pg-dim: #a3a8c3;
	--pg-accent: #a5b4fc;
	--pg-accent-strong: #c7d0fe;
	--pg-accent-bg: #4338ca;
	--pg-accent-soft: rgba(99, 102, 241, 0.16);
	--pg-todo-bg: rgba(234, 179, 8, 0.08);
	--pg-todo-fg: #f3dc94;
	--pg-todo-border: rgba(234, 179, 8, 0.45);
	--pg-nav-h: 67px;
}

.page-hero { padding: 56px 0 24px; }
.page-hero .eyebrow { color: var(--pg-accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; }
.page-hero .lead { color: var(--pg-muted); font-size: 17px; max-width: 760px; margin-top: 14px; }
.page-hero .accent { color: var(--pg-accent); }

.g-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; list-style: none; }
.g-cats a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--pg-line); color: var(--pg-muted); text-decoration: none; font-size: 14px; font-weight: 500; background: rgba(25, 27, 34, 0.7); transition: border-color .2s ease, color .2s ease, background .2s ease; }
.g-cats a:hover { color: var(--pg-accent-strong); border-color: var(--pg-accent); }
.g-cats a.on { color: #fff; background: var(--pg-accent-bg); border-color: var(--pg-accent-bg); }
.g-cats .n { font-size: 12px; opacity: .8; }

.g-section { padding: 34px 0 10px; scroll-margin-top: calc(var(--pg-nav-h) + 12px); }
.g-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--pg-line-soft); padding-bottom: 14px; margin-bottom: 22px; }
.g-sec-head h2 { font-size: 24px; font-weight: 600; }
.g-sec-head p { color: var(--pg-dim); font-size: 15px; margin-top: 4px; max-width: 760px; }
.g-sec-count { color: var(--pg-dim); font-size: 13px; white-space: nowrap; }
.g-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.g-card { background: var(--pg-card); border: 1px solid var(--pg-line-soft); border-radius: 14px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: border-color .2s ease, transform .2s ease; }
.g-card:hover { border-color: var(--pg-line); transform: translateY(-2px); }
.g-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #0f1015; cursor: zoom-in; aspect-ratio: 16 / 10; overflow: hidden; }
.g-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.g-thumb:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: -2px; }
.g-zoom { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(10, 11, 16, 0.8); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; color: var(--pg-accent-strong); font-size: 15px; }
.g-thumb:hover .g-zoom, .g-thumb:focus-visible .g-zoom { opacity: 1; }
.g-card figcaption { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.g-card figcaption strong { font-size: 15.5px; font-weight: 600; color: var(--pg-text); }
.g-card figcaption span { font-size: 14px; color: var(--pg-dim); line-height: 1.5; }
.g-note { color: var(--pg-dim); font-size: 14px; margin: 34px 0 10px; }
.g-note a, .guide a { color: var(--pg-accent); }

.shot-todo { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 18px; min-height: 120px; border: 2px dashed var(--pg-todo-border); background: var(--pg-todo-bg); border-radius: 12px; color: var(--pg-todo-fg); font-size: 14px; }
.g-thumb .shot-todo { position: absolute; inset: 0; border-radius: 0; text-align: left; }
.shot-todo b { color: var(--pg-todo-fg); font-weight: 700; }

.vw { position: fixed; inset: 0; z-index: 3000; background: rgba(8, 9, 12, 0.97); display: flex; flex-direction: column; }
.vw[hidden] { display: none; }
.vw-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--pg-muted); font-size: 14px; }
.vw-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pg-text); font-weight: 500; }
.vw-count { color: var(--pg-dim); white-space: nowrap; }
.vw button { background: var(--pg-card-2); color: var(--pg-text); border: 1px solid var(--pg-line); border-radius: 10px; min-width: 40px; height: 40px; padding: 0 10px; font: inherit; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vw button:hover { border-color: var(--pg-accent); color: var(--pg-accent-strong); }
.vw button:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.vw-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: grab; }
.vw-stage.drag { cursor: grabbing; }
.vw-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.vw-prev { left: 12px; }
.vw-next { right: 12px; }
.vw-cap { padding: 10px 16px 16px; text-align: center; color: var(--pg-muted); font-size: 14.5px; }
body.vw-open { overflow: hidden; }

.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; padding: 32px 0 40px; }
.toc-col { position: sticky; top: calc(var(--pg-nav-h) + 16px); align-self: start; }
.toc { max-height: calc(100vh - var(--pg-nav-h) - 32px); overflow: auto; padding: 18px 16px; background: var(--pg-card); border: 1px solid var(--pg-line-soft); border-radius: 14px; scrollbar-width: thin; scrollbar-color: var(--pg-line) transparent; }
.toc-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--pg-accent); font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--pg-muted); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--pg-accent-strong); background: var(--pg-card-2); }
.toc a[aria-current="true"] { color: #fff; background: var(--pg-accent-bg); }
.toc-btn { display: none; }
.guide { min-width: 0; }
.guide .eyebrow { color: var(--pg-accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.guide h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; margin-bottom: 12px; }
.guide .area { padding: 8px 0 30px; border-bottom: 1px solid var(--pg-line-soft); margin-bottom: 30px; scroll-margin-top: calc(var(--pg-nav-h) + 12px); }
.guide .area:last-child { border-bottom: 0; }
.guide h2 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.guide h3 { font-size: 19px; font-weight: 600; margin: 26px 0 8px; color: var(--pg-accent-strong); scroll-margin-top: calc(var(--pg-nav-h) + 12px); }
.guide p { color: var(--pg-muted); margin: 8px 0; }
.guide .lead { font-size: 17px; color: var(--pg-text); }
.guide strong { color: var(--pg-text); }
.guide ol.g-steps, .guide ul.points { margin: 8px 0 8px 22px; color: var(--pg-muted); }
.guide ol.g-steps > li, .guide ul.points > li { margin: 8px 0; padding-left: 4px; }
.guide .tip { border-left: 3px solid var(--pg-accent); background: var(--pg-accent-soft); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 12px 0; color: var(--pg-muted); }
.guide .tip strong { color: var(--pg-accent-strong); }
.guide .quick { margin-top: 22px; padding: 18px 20px; background: var(--pg-card); border: 1px solid var(--pg-line-soft); border-radius: 14px; }
.guide .quick h2 { font-size: 18px; margin-bottom: 8px; }
.guide .quick ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.guide .quick a { text-decoration: none; font-size: 15px; }
.guide .quick a:hover { text-decoration: underline; }
.guide figure.gshot { margin: 14px 0 18px; }
.guide .shot-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--pg-line-soft); border-radius: 12px; overflow: hidden; background: #0f1015; cursor: zoom-in; }
.guide .shot-btn img { display: block; width: 100%; height: auto; }
.guide .shot-btn:hover { border-color: var(--pg-line); }
.guide .shot-btn:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.guide figure.gshot figcaption { font-size: 14px; color: var(--pg-dim); margin-top: 8px; }
.guide .table-wrap { overflow-x: auto; max-width: 100%; }
.guide table.ref { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14.5px; }
.guide table.ref th, .guide table.ref td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--pg-line-soft); vertical-align: top; color: var(--pg-muted); }
.guide table.ref th { color: var(--pg-text); font-weight: 600; background: var(--pg-card-2); }

[dir="rtl"] .vw-prev { left: auto; right: 12px; }
[dir="rtl"] .vw-next { right: auto; left: 12px; }
[dir="rtl"] .guide ol.g-steps, [dir="rtl"] .guide ul.points { margin: 8px 22px 8px 0; }
[dir="rtl"] .guide .tip { border-left: 0; border-right: 3px solid var(--pg-accent); border-radius: 10px 0 0 10px; }
[dir="rtl"] .guide table.ref th, [dir="rtl"] .guide table.ref td { text-align: right; }

@media (max-width: 960px) {
	.guide-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
	.toc-col { position: static; }
	.toc { max-height: none; display: none; }
	.toc.open { display: block; }
	.toc-btn { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--pg-line); background: var(--pg-card); color: var(--pg-text); font: inherit; font-size: 14px; cursor: pointer; }
}

@media (max-width: 640px) {
	.page-hero { padding: 36px 0 16px; }
	.g-grid { grid-template-columns: 1fr; }
	.guide h2 { font-size: 24px; }
	.vw-top { padding: 8px 10px; gap: 8px; }
	.vw button { min-width: 36px; height: 36px; }
	.vw-zoom-btns { display: none; }
}
