/* mygtd /app — generator layout. Tokens, buttons, fields, seg, toggle come from ../styles.css */
body { background: var(--soft); }
.g-wrap { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: 24px; }
.g-name { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; margin-right: auto; }
.g-top-actions { display: flex; gap: 8px; }

.g { max-width: 1600px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 24px; align-items: start; }

/* steps */
.g-form { display: grid; gap: 12px; }
.g-step { background: #fff; border-radius: var(--r); border: 1px solid var(--line); }
.g-step[open] { border-color: var(--brand); box-shadow: 0 0 0 .5px var(--brand), var(--sh); }
.g-step > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; border-radius: var(--r); }
.g-step > summary::-webkit-details-marker { display: none; }
.g-step > summary:hover { background: var(--soft); }
.g-step[open] > summary:hover { background: none; }
.g-num { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--muted); font-weight: 700; font-size: 15px; }
.g-step[open] .g-num { background: var(--brand); color: #fff; }
.g-st { display: grid; min-width: 0; flex: 1; }
.g-st b { font-size: 17px; color: var(--ink); line-height: 1.3; }
.g-sumline { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-step[open] .g-sumline { display: none; }
.g-state { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; font-weight: 700; }
.g-state.is-ok { background: var(--ok-soft); color: var(--ok); }
.g-state.is-todo { box-shadow: inset 0 0 0 2px #f0c36d; }
.g-body { padding: 4px 20px 22px; }
.g-step > summary:focus, .g-line > summary:focus, .g-more > summary:focus { outline: none; }
.g-step > summary:focus-visible .g-num, .g-line > summary:focus-visible .g-line-n { box-shadow: 0 0 0 3px rgba(37,84,244,.35); }
.g-more > summary:focus-visible { text-decoration: underline; }
.g-sub-h { font-size: 16px; font-weight: 700; color: var(--ink); margin: 20px 0 10px; }
.g-sub-h:first-child { margin-top: 4px; }
.g-next { margin-top: 22px; }
.g-opts .seg button { white-space: nowrap; }

/* fields */
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.g-grid + .g-grid { margin-top: 14px; }
.g-one { grid-template-columns: 1fr; }
.g-grid label, .g-line label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: #344054; }
.g-wide { grid-column: 1 / -1; }
.g .field { height: 44px; font-size: 16px; font-weight: 400; padding: 0 12px; border-color: #cfd5df; background: #fff; }
.g .field:hover { border-color: #b3bbc8; }
.g .field::placeholder { color: #b4bbc7; font-style: italic; }
.g .g-short { max-width: 220px; }
.g textarea.field { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.g select.field { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }
.g-more { margin-top: 14px; }
.g-more > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--brand); padding: 6px 0; list-style: none; }
.g-more > summary::-webkit-details-marker { display: none; }
.g-more > summary::before { content: '+ '; }
.g-more[open] > summary::before { content: '− '; }
.g-more > .g-grid { margin-top: 10px; }
.g-alt { margin-top: 18px; }
.g-sub { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--soft); }

/* goods */
.g-line { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.g-line + .g-line { margin-top: 8px; }
.g-line[open] { background: var(--soft); box-shadow: none; }
.g-line > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; cursor: pointer; }
.g-line > summary::-webkit-details-marker { display: none; }
.g-line-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }
.g-line.is-bad .g-line-n { background: #fff1d6; color: #a16207; }
.g-line-t { display: grid; flex: 1; min-width: 0; }
.g-line-name { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-line-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-line-body { padding: 2px 14px 16px; }
.g-del { flex: none; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); font-size: 20px; line-height: 1; }
.g-del:hover { background: var(--bad-soft); color: var(--bad); }
.g-add { margin-top: 12px; width: 100%; }
.g-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.g-sum div { padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); }
.g-sum span { display: block; font-size: 12px; color: var(--muted); }
.g-sum b { display: block; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.g-view { position: sticky; top: 92px; display: grid; gap: 12px; }
.g-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.g-tabs { display: flex; }
.g-tabs button { padding: 0 16px; background: #fff; }
.g-export { display: flex; gap: 8px; align-items: center; }
.g .g-what { height: 40px; width: auto; font-size: 14px; }
.g-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.g-opts .seg { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.g .g-opts .seg button { padding: 0 14px; }
.g-opts .toggle { font-size: 14px; }
.g-warn:empty { display: none; }
.g-warn { background: #fff8e6; color: #7a4d00; border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: inset 0 0 0 1px #f3dfae; }
.g-warn ul { display: grid; gap: 2px; margin-top: 4px; padding-left: 18px; list-style: disc; }
.g-warn.is-ok { background: var(--ok-soft); color: #0b7a44; box-shadow: none; }
.g-paper { background: #dfe3ea; border-radius: var(--r); padding: 20px; overflow: auto; max-height: calc(100vh - 220px); }
.g-page { width: 100%; max-width: 210mm; min-height: 60vh; margin: 0 auto; background: #fff; padding: clamp(20px, 5%, 56px); box-shadow: var(--sh); }
.g .seg button { padding: 0 14px; }
.g textarea { font: inherit; }
.g-note { font-size: 13px; color: var(--muted); text-align: center; }

.print-root { display: none; }

@media (max-width: 72em) {
  .g { grid-template-columns: 1fr; }
  .g-view { position: static; }
  .g-paper { max-height: none; }
}
@media (max-width: 40em) {
  .g, .g-wrap { padding-inline: 12px; }
  .g { padding-top: 12px; }
  .g-name { display: none; }
  .top-in { justify-content: space-between; }
  .g-step > summary { padding: 14px; gap: 12px; }
  .g-body { padding: 0 14px 18px; }
  .g-line-body { padding: 0 10px 14px; }
  .g-grid { gap: 12px 10px; }
  .g-sum { grid-template-columns: 1fr 1fr; }
  .g-paper { padding: 8px; }
  .g-page { width: 210mm; max-width: none; padding: 14mm; zoom: .46; }
  .g-export { width: 100%; }
  .g .g-what { flex: 1; }
}

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; }
  .ui { display: none !important; }
  .print-root { display: block; }
  .print-root .sheet + .sheet { break-before: page; page-break-before: always; }
}

/* ================= smoothness & polish ================= */
:root { interpolate-size: allow-keywords; }
body { background: linear-gradient(180deg, #eef2fb 0, var(--soft) 360px) no-repeat, var(--soft); }
.g-step { scroll-margin-top: 84px; transition: border-color .25s ease, box-shadow .3s ease; }
.g-step > summary { transition: background-color .2s ease; }
.g-num { transition: background-color .25s ease, color .25s ease, box-shadow .2s ease; }

/* accordion height animation (browsers without ::details-content just open instantly) */
@media (prefers-reduced-motion: no-preference) {
  .g-step::details-content, .g-line::details-content, .g-more::details-content {
    block-size: 0; overflow: hidden; opacity: 0;
    transition: block-size .32s cubic-bezier(.2, .7, .2, 1), opacity .24s ease, content-visibility .32s allow-discrete;
  }
  .g-step[open]::details-content, .g-line[open]::details-content, .g-more[open]::details-content { block-size: auto; opacity: 1; }
  .g-sumline { transition: opacity .2s ease; }
}

/* status mark */
.g-state { transition: background-color .25s ease, box-shadow .25s ease, color .25s ease; }
.g-state.is-pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

/* next buttons */
.g-arrow { display: inline-block; transition: transform .2s ease; }
.g-next:hover .g-arrow { transform: translateX(3px); }

/* goods rows */
.g-line { transition: background-color .25s ease, box-shadow .25s ease; }
.g-line > summary { border-radius: 12px; transition: background-color .2s ease; }
.g-line:not([open]) > summary:hover { background: var(--soft); }
.g-line-n { transition: background-color .2s ease, color .2s ease; }
.g-del { transition: background-color .15s ease, color .15s ease; }

/* totals */
.g-sum div { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.g-sum div:first-child { background: var(--brand); box-shadow: none; }
.g-sum div:first-child span { color: rgba(255, 255, 255, .75); }
.g-sum div:first-child b { color: #fff; }
.g-sum b { font-size: 16px; margin-top: 2px; }

/* toolbar card */
.g-toolbar { display: grid; gap: 12px; padding: 12px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.g-toolbar .g-opts { padding-top: 12px; border-top: 1px solid var(--line); }
.g-tabs { gap: 6px; }
.g-tabs button { background: transparent; box-shadow: none; }
.g-tabs button:hover { background: var(--soft); }
.g-opts .seg { background: var(--soft); box-shadow: none; }

/* warnings */
.g-warn { padding: 14px 16px; border-radius: 14px; animation: fadein .3s ease; }
.g-warn-h { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.g-warn-ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #f5b83d; color: #fff; font-size: 13px; font-weight: 800; }
.g-warn.is-ok .g-warn-ic { background: var(--ok); }
.g-warn ul { margin: 8px 0 0 32px; padding: 0; gap: 4px; }
.g-warn-more { margin: 8px 0 0 32px; font-size: 14px; font-weight: 600; color: #7a4d00; text-decoration: underline; text-underline-offset: 3px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }

/* preview paper */
.g-paper { background: #e4e8ef radial-gradient(circle at 1px 1px, rgba(16, 24, 40, .07) 1px, transparent 0) 0 0 / 16px 16px; border: 1px solid var(--line); }
.g-page { border-radius: 4px; box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 18px 40px -18px rgba(16, 24, 40, .35); transition: opacity .14s ease, transform .14s ease; }
.g-page.is-swap { opacity: 0; transform: translateY(6px); }
.g-page .is-new { animation: changed 1.4s ease; }
@keyframes changed { 0%, 30% { background-color: #fff1a8; } 100% { background-color: transparent; } }

/* first paint: steps and preview rise in once */
@media (prefers-reduced-motion: no-preference) {
  .g-form > *, .g-view > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
  .g-form > :nth-child(2) { animation-delay: 50ms; }
  .g-form > :nth-child(3) { animation-delay: 100ms; }
  .g-form > :nth-child(4) { animation-delay: 150ms; }
  .g-view > :nth-child(2) { animation-delay: 80ms; }
  .g-view > :nth-child(3) { animation-delay: 140ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}
@media (max-width: 40em) {
  .g-toolbar { padding: 10px; }
  .g-sum div:first-child { grid-column: 1 / -1; }
}

/* totals: amount on its own full-width row, places and weights below */
.g-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-sum div:first-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.g-sum div:first-child span { font-size: 14px; }
.g-sum div:first-child b { font-size: 20px; margin: 0; }
.g-sum b { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 40em) { .g-sum b { font-size: 14px; } .g-sum div:first-child b { font-size: 18px; } }
@media (max-width: 40em) {
  .g-sum { grid-template-columns: 1fr; gap: 6px; }
  .g-sum div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; }
  .g-sum b { font-size: 15px; margin: 0; }
}

/* ================= step numbers in colour ================= */
.g-num { background: var(--brand-soft); color: var(--brand); }
.g-step[open] .g-num { background: var(--brand); color: #fff; box-shadow: 0 4px 10px -2px rgba(37, 84, 244, .45); }

/* ================= preview side ================= */
.g-head { display: grid; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.g-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-docs button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; height: auto; text-align: left; border-radius: 12px; background: var(--soft); box-shadow: none; transition: background-color .2s ease, box-shadow .2s ease, transform .12s ease; }
.g-docs button:hover { background: #edf0f6; }
.g-docs button:active { transform: scale(.99); }
.g-docs button[aria-selected="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.g-doc-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s ease, color .2s ease; }
.g-doc-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-docs button[aria-selected="true"] .g-doc-ic { background: var(--brand); color: #fff; box-shadow: none; }
.g-doc-t { display: grid; min-width: 0; }
.g-doc-t b { font-size: 15px; color: var(--ink); }
.g-doc-t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.g-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.g-lang { background: var(--soft); }
.g .g-lang button { padding: 0 12px; height: 34px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.g-export .btn .ic { width: 16px; height: 16px; }

.g-paper { position: relative; padding: 0 28px 32px; background: linear-gradient(160deg, #e8eefd 0%, #eef1f7 45%, #e6eaf1 100%); border: 1px solid var(--line); }
.g-paper-bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 12px; margin: 0 -28px 20px; padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(246, 248, 252, .82); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.g-paper-name { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-page { border-radius: 3px; box-shadow: 0 0 0 1px rgba(16, 24, 40, .04), 0 2px 4px rgba(16, 24, 40, .06), 0 24px 48px -20px rgba(23, 45, 120, .35); }
.g-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.g-note .ic { width: 14px; height: 14px; }

@media (max-width: 40em) {
  .g-docs { grid-template-columns: 1fr; }
  .g-actions, .g-export { width: 100%; }
  .g-lang { width: 100%; }
  .g-paper { padding: 0 8px 12px; }
  .g-paper-bar { margin: 0 -8px 10px; }
}

/* language and downloads sit together on the right */
.g-actions { justify-content: flex-end; gap: 8px; }
.g-actions .g-export { gap: 8px; }
.g .g-lang button { height: 32px; }
.g-lang { height: 40px; align-items: center; }
@media (max-width: 40em) { .g-actions { justify-content: stretch; } .g-export .btn { flex: 1; } }

/* ================= right rail: language + downloads ================= */
.g { max-width: 1680px; grid-template-columns: minmax(0, 560px) minmax(0, 1fr) 76px; }
.g-rail { position: sticky; top: 92px; display: grid; gap: 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.g-rb { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 10px 4px; border-radius: 12px; color: var(--ink); font-size: 12px; font-weight: 600; transition: background-color .15s ease, color .15s ease, transform .12s ease; }
.g-rb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-rb:hover { background: var(--soft); }
.g-rb:active { transform: scale(.96); }
.g-rb[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand); }
.g-rb-main { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 84, 244, .6); }
.g-rb-main:hover { background: var(--brand-ink); }
#lang-now { white-space: nowrap; }
.g-langpick { position: relative; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.g-menu { position: absolute; z-index: 30; top: 0; right: calc(100% + 14px); width: 230px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); display: grid; gap: 2px; animation: menuin .16s ease; }
.g-menu[hidden] { display: none; }
.g-menu-h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 10px 6px; }
.g-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; color: var(--ink); }
.g-menu button b { flex: none; min-width: 46px; padding: 2px 6px; border-radius: 6px; background: var(--soft); font-size: 11px; text-align: center; color: var(--muted); }
.g-menu button:hover { background: var(--soft); }
.g-menu button[aria-checked="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.g-menu button[aria-checked="true"] b { background: var(--brand); color: #fff; }
@keyframes menuin { from { opacity: 0; transform: translateX(6px); } }

/* one column: the rail turns into a row of buttons above the preview */
@media (max-width: 72em) {
  .g { grid-template-columns: 1fr; }
  .g-form { order: 1; }
  .g-rail { order: 2; position: static; display: flex; align-items: stretch; justify-content: flex-end; gap: 8px; }
  .g-view { order: 3; }
  .g-rb { grid-auto-flow: column; align-items: center; gap: 8px; width: auto; padding: 10px 16px; font-size: 14px; }
  .g-rb svg { width: 18px; height: 18px; }
  .g-langpick { padding: 0 8px 0 0; border-bottom: 0; border-right: 1px solid var(--line); margin-right: auto; }
  .g-menu { top: calc(100% + 8px); right: auto; left: 0; }
  @keyframes menuin { from { opacity: 0; transform: translateY(-6px); } }
}
@media (max-width: 40em) {
  .g-rail { padding: 6px; }
  .g-rb { padding: 10px 12px; }
  .g-rb-main, #b-doc { flex: 1; justify-content: center; }
}

/* ================= check in the rail ================= */
.g-checkpick { position: relative; }
.g-check-ic { position: relative; display: grid; place-items: center; }
.g-rb.is-ok .g-check-ic svg { color: var(--ok); }
.g-rb.is-bad .g-check-ic svg { color: #d97706; }
.g-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: #f59e0b; box-shadow: 0 0 0 2px #fff; }
.g-rb.is-ok .g-badge { background: var(--ok); }
.g-check-menu { width: 320px; max-height: 60vh; overflow: auto; }
.g-issue { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; line-height: 1.4; color: var(--ink); }
.g-issue:hover { background: #fff8e6; }
.g-issue-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #f59e0b; }
.g-allok { display: flex; gap: 12px; padding: 10px; }
.g-allok-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 800; }
.g-allok b { display: block; color: var(--ink); }
.g-allok p { font-size: 14px; color: var(--muted); line-height: 1.4; }
@media (max-width: 72em) {
  .g-checkpick { margin-right: auto; }
  .g-langpick { margin-right: 0; }
  .g-check-menu { right: auto; left: 0; }
  .g-badge { right: -10px; }
}
@media (max-width: 40em) { .g-checkpick .g-rb > span:last-child { display: none; } .g-check-menu { width: min(320px, calc(100vw - 40px)); } }

/* ================= preview window ================= */
.g-win { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
.g-win-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.g-win-doc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.g-win-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.g-win-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-win-t { display: grid; min-width: 0; }
.g-win-t b { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-win-t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-zoom { display: flex; align-items: center; flex: none; padding: 3px; border-radius: 10px; background: var(--soft); }
.g-zoom button { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--text); transition: background-color .15s ease; }
.g-zoom button:hover { background: #fff; }
.g-zoom .g-zoom-v { min-width: 56px; font-size: 13px; font-variant-numeric: tabular-nums; }
.g-zoom .g-zoom-v.is-fit { color: var(--brand); }

.g-win .g-paper { border: 0; border-radius: 0; padding: 28px; max-height: calc(100vh - 290px); min-height: 420px;
  background: radial-gradient(120% 80% at 50% 0%, #eef2fd 0%, #e9edf4 55%, #e4e8ef 100%);
  scrollbar-width: thin; scrollbar-color: #c2c9d6 transparent; }
.g-win .g-paper::-webkit-scrollbar { width: 10px; height: 10px; }
.g-win .g-paper::-webkit-scrollbar-thumb { background: #c2c9d6; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.g-win .g-paper::-webkit-scrollbar-thumb:hover { background-color: #a9b2c2; }
.g-win .g-paper::-webkit-scrollbar-track { background: transparent; }
.g-win .g-page { width: 210mm; max-width: none; min-height: 297mm; padding: 14mm 13mm; margin: 0 auto; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08), 0 30px 60px -28px rgba(23, 45, 120, .4); }
@media (max-width: 72em) { .g-win .g-paper { max-height: none; min-height: 0; } }
@media (max-width: 40em) {
  .g-win .g-paper { padding: 12px; }
  .g-win .g-page { zoom: initial; }
  .g-win-t span { display: none; }
}
