/* Gang Sheet Maker: an editor in four columns (rail, designs, sheet, sheets) */
.gx-page {
  --gx-bg: #f3f4f6; --gx-panel: #ffffff; --gx-ink: #0f172a; --accent: #c2410c; --gx-muted: #556070; --gx-line: #e5e7eb; --gx-field: #868e9c;
  --gx-soft: #f4f5f7; --gx-dark: #111827; --gx-sel: #2456d6; --gx-ok: #166534; --gx-warn: #92400e; --gx-bad: #b91c1c;
  --gx-r: 12px; --gx-shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .06);
  --gx-pop: 0 24px 60px rgb(15 23 42 / .22), 0 2px 8px rgb(15 23 42 / .08);
  overflow: hidden; background: var(--gx-bg); color: var(--gx-ink);
  font: 13.5px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.gx-page i[data-i] { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; font-style: normal; }
.gx-page i[data-i] svg { width: 100%; height: 100%; }
.checker { background-color: #fff; background-image: conic-gradient(#e5e7eb 25%, #fff 0 50%, #e5e7eb 0 75%, #fff 0); background-size: 12px 12px; }

.gx { display: grid; grid-template-columns: 72px 300px minmax(0, 1fr) 240px; height: calc(100vh - 64px); height: calc(100dvh - 64px); }

/* ---------------------------------------------------------------- buttons */
.gx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--gx-line); background: var(--gx-panel); color: var(--gx-ink);
  font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.gx-btn:hover:not(:disabled) { border-color: #cbd5e1; background: #fafafa; }
.gx-btn:active:not(:disabled) { transform: translateY(1px); }
.gx-btn.dark { background: var(--gx-dark); color: #fff; border-color: var(--gx-dark); }
.gx-btn.dark:hover:not(:disabled) { background: #1f2937; }
.gx-btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.gx-btn.accent:hover:not(:disabled) { background: #9a3412; }
.gx-btn.navy { background: #2151b6; color: #fff; border-color: #2151b6; box-shadow: 0 4px 14px rgb(33 81 182 / .3); }
.gx-btn.navy:hover:not(:disabled) { background: #1b449d; border-color: #1b449d; }
.gx-btn.ghost { background: transparent; border-color: transparent; }
.gx-btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.gx-btn.danger { color: var(--gx-bad); }
.gx-btn i[data-i] { width: 16px; height: 16px; }
.gx-ib { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: #334155; transition: background .12s, color .12s; }
.gx-ib:hover:not(:disabled) { background: var(--gx-soft); border-color: transparent; color: var(--gx-ink); }
.gx-ib.on { background: color-mix(in srgb, var(--gx-sel) 12%, transparent); color: var(--gx-sel); }
.gx-ib.danger:hover:not(:disabled) { color: var(--gx-bad); background: #fef2f2; }
.gx-ib:disabled { opacity: .35; }
.gx-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--gx-ink); font-weight: 550; text-align: left; }
.gx-link:hover { background: var(--gx-soft); }
.gx-link i[data-i] { color: var(--gx-muted); }
.gx-muted { color: var(--gx-muted); }

/* ---------------------------------------------------------------- the rail */
.gx-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--gx-panel); border-right: 1px solid var(--gx-line); }
.gx-rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; padding: 9px 0 7px; border: 0; border-radius: 12px;
  background: none; color: var(--gx-muted); font-size: 11px; font-weight: 600; }
.gx-rail-btn i[data-i] { width: 21px; height: 21px; }
.gx-rail-btn:hover { background: var(--gx-soft); color: var(--gx-ink); }
.gx-rail-btn.on { background: var(--gx-dark); color: #fff; }

/* ---------------------------------------------------------------- the left panel */
.gx-left { display: flex; flex-direction: column; gap: 14px; padding: 14px; overflow-y: auto; background: var(--gx-panel); border-right: 1px solid var(--gx-line); }
.gx-pane { display: flex; flex-direction: column; gap: 10px; }
.gx-h { margin: 2px 0 0; font-size: 15px; }
.gx-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 16px; text-align: center; cursor: pointer;
  border: 1.5px dashed #cbd5e1; border-radius: 14px; background: linear-gradient(180deg, #fafbfc, #f5f6f8); transition: border-color .15s, background .15s; }
.gx-drop:hover, .gx-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, #fff); }
.gx-drop-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--accent); box-shadow: var(--gx-shadow); }
.gx-drop b { font-size: 14px; }
.gx-drop small { color: var(--gx-muted); font-size: 11.5px; line-height: 1.4; }
.gx-drop .gx-btn { margin-top: 4px; pointer-events: none; }
.gx-type { display: flex; flex-direction: column; gap: 8px; }
.gx-type-h { font-size: 13.5px; }
.gx-type button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--gx-line); border-radius: 12px;
  background: #fff; color: var(--gx-ink); text-align: left; transition: border-color .12s, background .12s, box-shadow .12s; }
.gx-type button:hover { border-color: #94a3b8; }
.gx-type button i[data-i] { width: 20px; height: 20px; color: var(--gx-muted); }
.gx-type button span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gx-type button b { font-size: 13px; }
.gx-type button small { color: var(--gx-muted); font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.gx-type button.on { border-color: #2151b6; background: #eef2ff; box-shadow: 0 0 0 3px rgb(33 81 182 / .12); }
.gx-type button.on i[data-i] { color: #2151b6; }
.gx-lib-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.gx-lib-head span { color: var(--gx-muted); font-size: 12px; }
.gx-lib { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gx-lib-empty { grid-column: 1 / -1; margin: 0; font-size: 12.5px; }
.gx-asset { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1.5px solid var(--gx-line); border-radius: 11px;
  background: none; overflow: hidden; text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.gx-asset:hover { border-color: #94a3b8; transform: translateY(-1px); box-shadow: var(--gx-shadow); }
.gx-asset.sel { border-color: var(--gx-sel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gx-sel) 18%, transparent); }
.gx-asset .th { display: grid; place-items: center; aspect-ratio: 1; padding: 6px; }
.gx-asset .th img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gx-asset .nm { padding: 0 6px 5px; font-size: 10.5px; color: var(--gx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-asset .qty { position: absolute; right: 5px; bottom: 22px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gx-dark); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.gx-asset .x { position: absolute; top: 4px; right: 4px; display: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: rgb(15 23 42 / .75); color: #fff; font-size: 13px; line-height: 20px; }
.gx-asset:hover .x { display: block; }
.gx-asset .score { position: absolute; top: 4px; left: 4px; padding: 0 5px; height: 18px; border-radius: 6px; font-size: 10.5px; font-weight: 700; line-height: 18px; color: #fff; }
.gx-asset.loading .th { opacity: .4; }
.gx-asset.loading::after { content: ""; position: absolute; left: 50%; top: 40%; width: 18px; height: 18px; margin: -9px; border-radius: 50%;
  border: 2px solid var(--gx-line); border-top-color: var(--accent); animation: gx-spin .8s linear infinite; }

/* fields */
.gx-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gx-field > label { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--gx-muted); letter-spacing: .01em; }
.gx-field output { color: var(--gx-ink); font-variant-numeric: tabular-nums; }
.gx-page select, .gx-page input[type=number], .gx-page textarea, .gx-page input[type=text] {
  height: 34px; padding: 0 10px; border: 1px solid var(--gx-line); border-radius: 9px; background: #fff; color: var(--gx-ink); font-size: 13px; width: 100%; }
.gx-page textarea { height: auto; padding: 8px 10px; resize: vertical; font: inherit; }
.gx-page select:focus, .gx-page input:focus, .gx-page textarea:focus { outline: 2px solid color-mix(in srgb, var(--gx-sel) 35%, transparent); outline-offset: 0; border-color: var(--gx-sel); }
.gx-page input[type=color] { width: 100%; height: 34px; padding: 3px; border: 1px solid var(--gx-line); border-radius: 9px; background: #fff; }
.gx-page input[type=range] { width: 100%; accent-color: var(--gx-dark); }
.gx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gx-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.gx-in { position: relative; display: flex; align-items: center; }
.gx-in input { padding-right: 26px !important; }
.gx-in > span { position: absolute; right: 9px; color: var(--gx-muted); font-size: 11.5px; pointer-events: none; }
.gx-seg { display: flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--gx-soft); }
.gx-seg button { flex: 1; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--gx-muted); font-weight: 600; font-size: 12.5px; }
.gx-seg button.on { background: #fff; color: var(--gx-ink); box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.gx-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-swatches button, .gx-swatch-pick { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid #cbd5e1; background: var(--c, #fff); cursor: pointer; }
.gx-swatches button.checker { background-size: 8px 8px; }
.gx-swatches button.on { outline: 2px solid var(--gx-dark); outline-offset: 2px; }
.gx-swatch-pick { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.gx-swatch-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gx-switch { position: relative; display: flex; align-items: center; gap: 9px; font-weight: 550; cursor: pointer; user-select: none; }
.gx-switch > input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gx-switch > span { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: #cbd5e1; transition: background .15s; }
.gx-switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.gx-switch > input:checked + span { background: var(--gx-dark); }
.gx-switch > input:checked + span::after { transform: translateX(14px); }
.gx-switch > input:focus-visible + span { outline: 2px solid var(--gx-sel); outline-offset: 2px; }
.gx-switch.sm { font-size: 12px; gap: 7px; }
.gx-switch.sm > span { width: 28px; height: 16px; }
.gx-switch.sm > span::after { width: 12px; height: 12px; }
.gx-switch.sm > input:checked + span::after { transform: translateX(12px); }
.gx-switch input[type=color] { width: 30px; height: 24px; margin-left: auto; padding: 2px; }
.gx-switch output { margin-left: auto; color: var(--gx-muted); font-variant-numeric: tabular-nums; }
.gx-actions { display: flex; gap: 8px; }
.gx-actions.two > * { flex: 1; }
.gx-text-prev { display: grid; place-items: center; min-height: 90px; max-height: 160px; padding: 10px; border-radius: 12px; overflow: hidden; }
.gx-text-prev canvas { max-width: 100%; max-height: 140px; }
.gx-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 12.5px; }
.gx-keys dt { font-weight: 700; white-space: nowrap; }
.gx-keys dd { margin: 0; color: var(--gx-muted); }

/* the selection */
.gx-props { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--gx-line); }
.gx-sel-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; }
.gx-sel-thumb { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--gx-line); padding: 4px; background-size: 8px 8px; }
.gx-sel-thumb img { max-width: 100%; max-height: 100%; }
.gx-sel-meta { min-width: 0; }
.gx-sel-meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-sel-meta small { color: var(--gx-muted); font-size: 11.5px; }
.gx-dpi { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.gx-dpi.ok { background: #dcfce7; color: #166534; } .gx-dpi.good { background: #fef9c3; color: #854d0e; }
.gx-dpi.bad { background: #fee2e2; color: #991b1b; } .gx-dpi.vec { background: #e0e7ff; color: #3730a3; }
.gx-size { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: end; gap: 6px; }
.gx-lock { display: grid; place-items: center; width: 30px; height: 34px; padding: 0; border: 1px solid var(--gx-line); border-radius: 9px; background: #fff; color: var(--gx-muted); }
.gx-lock.on { color: var(--gx-ink); background: var(--gx-soft); }
.gx-lock i[data-i] { width: 15px; height: 15px; }
.gx-stepper { display: grid; grid-template-columns: 34px 1fr 34px; border: 1px solid var(--gx-line); border-radius: 9px; overflow: hidden; }
.gx-stepper button { border: 0; border-radius: 0; background: var(--gx-soft); font-size: 16px; padding: 0; }
.gx-stepper input { border: 0 !important; border-radius: 0 !important; text-align: center; outline: none !important; }
.gx-tools { display: grid; grid-template-columns: 1fr; gap: 8px; }
.gx-tool { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 11px; border: 1px solid var(--gx-line); border-radius: 11px; background: #fff;
  color: var(--gx-ink); font-weight: 600; font-size: 12.5px; text-align: center; transition: border-color .12s, background .12s, box-shadow .12s; }
.gx-tool:hover:not(:disabled) { border-color: #94a3b8; box-shadow: var(--gx-shadow); }
.gx-tool i[data-i] { color: var(--gx-muted); }
.gx-tool.wide { grid-column: 1 / -1; }
.gx-tool.hero { grid-column: 1 / -1; height: auto; padding: 11px 12px; border: 0; color: #fff; justify-content: flex-start; text-align: left;
  background: radial-gradient(120% 140% at 0% 0%, #1d4ed8 0%, #4338ca 45%, #6d28d9 100%); box-shadow: 0 8px 22px rgb(79 70 229 / .35); }
.gx-tool.hero i[data-i] { width: 22px; height: 22px; color: #fff; }
.gx-tool.hero span { display: flex; flex-direction: column; flex: 1; }
.gx-tool.hero b { font-size: 14px; }
.gx-tool.hero small { opacity: .94; font-weight: 500; font-size: 11.5px; }
.gx-tool.hero em { font-style: normal; min-width: 38px; padding: 3px 8px; border-radius: 999px; background: rgb(255 255 255 / .2); font-weight: 800; text-align: center; }
.gx-tool.hero em:empty { display: none; }
.gx-tool.hero:hover:not(:disabled) { filter: brightness(1.06); }
.gx-adjust { border: 1px solid var(--gx-line); border-radius: 12px; padding: 0 12px; }
.gx-adjust[open] { padding-bottom: 12px; }
.gx-adjust summary { padding: 11px 0; font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.gx-adjust summary::-webkit-details-marker { display: none; }
.gx-adjust summary::after { content: "▾"; color: var(--gx-muted); }
.gx-adjust[open] summary::after { content: "▴"; }
.gx-adjust > * + * { margin-top: 10px; }
.gx-multi b { font-size: 15px; }

/* ---------------------------------------------------------------- the toolbar and the sheet */
.gx-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gx-toolbar { display: flex; align-items: center; gap: 4px; min-height: 54px; padding: 8px 12px; background: var(--gx-panel); border-bottom: 1px solid var(--gx-line);
  overflow-x: auto; scrollbar-width: none; }
.gx-toolbar::-webkit-scrollbar { display: none; }
.gx-select { width: auto !important; min-width: 0; font-weight: 600; }
.gx-kind { display: inline-flex; align-items: center; gap: 0; height: 34px; padding-left: 10px; border: 1px solid var(--gx-line); border-radius: 9px; background: #fff; }
.gx-kind span { color: var(--gx-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gx-kind select { width: auto !important; height: 32px !important; border: 0 !important; background-color: transparent !important; font-weight: 600; color: #2151b6 !important; outline: none !important; }
.gx-lights { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--gx-soft); }
.gx-lights[hidden] { display: none; }
.gx-lights button { display: grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--gx-muted); }
.gx-lights button.on { background: #fff; color: #2151b6; box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.gx-lights button[data-v="off"].on { background: #0b1020; color: #b6ff8c; }
.gx-lights i[data-i] { width: 16px; height: 16px; }
.gx-sep { flex: none; width: 1px; height: 22px; margin: 0 5px; background: var(--gx-line); }
.gx-group { display: flex; align-items: center; gap: 2px; }
.gx-grow { flex: 1; }
.gx-margin { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: #334155; }
.gx-margin input[type=number] { width: 66px; height: 30px; }
.gx-margin input[type=checkbox] { accent-color: var(--gx-dark); width: 15px; height: 15px; }
.gx-margin .u { color: var(--gx-muted); font-weight: 500; }
.gx-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #e8eaee;
  background-image: radial-gradient(circle at 1px 1px, rgb(15 23 42 / .07) 1px, transparent 0); background-size: 18px 18px; }
.gx-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; outline: none; }
.gx-stage.hand canvas { cursor: grab; }
.gx-stage.panning canvas { cursor: grabbing; }
.gx-float { position: absolute; z-index: 2; background: rgb(255 255 255 / .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(229 231 235 / .9); border-radius: 14px; box-shadow: var(--gx-shadow); }
.gx-lines { bottom: 66px; right: 16px; display: flex; flex-direction: column; gap: 7px; width: 214px; padding: 9px 12px 11px; }
.gx-lines-h { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 22px; padding: 0; border: 0; background: none;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gx-muted); }
.gx-lines.collapsed .gx-lines-h span { transform: rotate(180deg); }
.gx-lines.collapsed > :not(.gx-lines-h):not(.gx-selinfo) { display: none; }
.gx-ctx { bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px 6px; animation: gx-rise .14s ease; }
.gx-ctx .gx-ib { width: 32px; height: 32px; }
.gx-legend { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 0; padding: 7px 0 0; list-style: none; font-size: 11.5px; color: #475569; border-top: 1px solid var(--gx-line); }
.gx-legend li { display: flex; align-items: center; gap: 7px; }
.gx-legend i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.gx-selinfo { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 2px 0 0; padding: 7px 0 0; font-size: 11.5px; border-top: 1px solid var(--gx-line); }
.gx-selinfo dt { color: var(--gx-muted); }
.gx-selinfo dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.gx-zoom { right: 16px; bottom: 16px; display: flex; align-items: center; gap: 2px; padding: 4px; }
.gx-zv { min-width: 58px; height: 32px; padding: 0 6px; border: 0; background: none; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.gx-veil { position: absolute; inset: 10px; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 8%, rgb(255 255 255 / .7)); pointer-events: none; }
.gx-veil div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 16px; color: var(--accent); }
.gx-veil i[data-i] { width: 36px; height: 36px; }
.gx-busy { position: absolute; left: 50%; top: 18px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 9px 16px; transform: translateX(-50%);
  border-radius: 999px; background: var(--gx-dark); color: #fff; box-shadow: var(--gx-pop); }
.gx-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .3); border-top-color: #fff; animation: gx-spin .8s linear infinite; }
@keyframes gx-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- the sheets */
.gx-right { display: flex; flex-direction: column; min-height: 0; background: var(--gx-panel); border-left: 1px solid var(--gx-line); }
.gx-right-head { padding: 16px 14px 8px; font-size: 14px; }
.gx-sheets { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 10px; overflow-y: auto; max-height: 46%; }
.gx-sheet { display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 9px; border: 1.5px solid var(--gx-line); border-radius: 13px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.gx-sheet:hover { border-color: #94a3b8; }
.gx-sheet.on { border-color: var(--gx-dark); box-shadow: 0 0 0 3px rgb(17 24 39 / .08); }
.gx-sheet canvas { width: 36px; height: 60px; border-radius: 5px; border: 1px solid var(--gx-line); background-size: 6px 6px; }
.gx-sheet-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gx-sheet-top { display: flex; align-items: center; gap: 4px; }
.gx-sheet-top input { height: 26px !important; padding: 0 6px !important; border-color: transparent !important; background: none !important; font-weight: 700; }
.gx-sheet-top input:hover, .gx-sheet-top input:focus { border-color: var(--gx-line) !important; background: #fff !important; }
.gx-sheet small { color: var(--gx-muted); font-size: 11.5px; }
.gx-sheet-act { display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.gx-sheet-act .gx-stepper { grid-template-columns: 20px 28px 20px; height: 26px; }
.gx-sheet-act .gx-stepper input { height: 24px; padding: 0; font-size: 12px; }
.gx-sheet-act .gx-ib { width: 22px; height: 22px; }
.gx-sheet-act .gx-ib i[data-i] { width: 15px; height: 15px; }
.gx-right-actions { padding: 6px 10px; border-top: 1px solid var(--gx-line); }
.gx-summary { margin: auto 12px 0; padding: 12px; border-radius: 12px; background: var(--gx-soft); font-size: 12.5px; }
.gx-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 0; }
.gx-summary dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.gx-summary dt { color: var(--gx-muted); }
.gx-summary .warn { color: var(--gx-warn); } .gx-summary .bad { color: var(--gx-bad); }
.gx-right-foot { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 12px 14px; }

/* ---------------------------------------------------------------- modals */
.gx-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgb(15 23 42 / .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: gx-fade .15s ease; }
@keyframes gx-fade { from { opacity: 0; } }
@keyframes gx-rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.gx-dialog { display: flex; flex-direction: column; width: min(1040px, 100%); max-height: min(760px, calc(100vh - 40px)); background: #fff; border-radius: 20px;
  box-shadow: var(--gx-pop); overflow: hidden; animation: gx-rise .18s ease; }
.gx-dialog.sm { width: min(460px, 100%); }
.gx-dialog.md { width: min(720px, 100%); }
.gx-dhead { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--gx-line); }
.gx-dhead h2 { margin: 0; font-size: 17px; }
.gx-dhead p { margin: 0; color: var(--gx-muted); font-size: 12px; }
.gx-dhead .gx-ib:last-child { margin-left: auto; }
.gx-dbody { flex: 1; min-height: 0; overflow: auto; }
.gx-dfoot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--gx-line); background: #fafafa; }
.gx-dfoot .gx-grow { color: var(--gx-muted); font-size: 12.5px; }
.gx-pad { padding: 18px 20px; }
.gx-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.gx-badge.pass { background: #dcfce7; color: #166534; } .gx-badge.fixed { background: #dbeafe; color: #1e40af; }
.gx-badge.review { background: #fef3c7; color: #92400e; } .gx-badge.run { background: #e0e7ff; color: #3730a3; }

/* PressCheck */
.pc { display: grid; grid-template-columns: 200px minmax(0, 1fr) 360px; min-height: 520px; height: 100%; }
.pc-list { padding: 12px; border-right: 1px solid var(--gx-line); overflow-y: auto; background: #fafafa; }
.pc-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 8px; margin-bottom: 6px; border: 1.5px solid transparent;
  border-radius: 11px; background: none; text-align: left; }
.pc-item:hover { background: #fff; border-color: var(--gx-line); }
.pc-item.on { background: #fff; border-color: var(--gx-dark); }
.pc-item img { width: 38px; height: 38px; object-fit: contain; border-radius: 7px; border: 1px solid var(--gx-line); background-size: 6px 6px; }
.pc-item b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-item small { font-size: 11px; color: var(--gx-muted); }
.pc-item em { font-style: normal; font-weight: 800; font-size: 12.5px; }
.pc-view { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; min-height: 0; }
.pc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-bar .gx-seg { width: auto; }
.pc-bar .gx-seg button { flex: none; padding: 0 12px; }
.pc-canvas { position: relative; flex: 1 1 0; min-height: 220px; display: grid; place-items: center; border-radius: 14px; overflow: hidden; background-size: 14px 14px; }
.pc-canvas img { position: absolute; max-width: 92%; max-height: 92%; object-fit: contain; transition: filter .15s; }
.pc-canvas .ov { pointer-events: none; }
.pc-canvas .tag { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; box-shadow: var(--gx-shadow); }
.pc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-card { padding: 9px 11px; border: 1px solid var(--gx-line); border-radius: 11px; }
.pc-card small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--gx-muted); text-transform: uppercase; }
.pc-card b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-card span { display: block; font-size: 11px; color: var(--gx-muted); }
.pc-checks { display: flex; flex-direction: column; border-left: 1px solid var(--gx-line); min-height: 0; }
.pc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.pc-head small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--gx-muted); text-transform: uppercase; }
.pc-head b { font-size: 17px; }
.pc-rows { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.pc-row { margin-bottom: 8px; border: 1px solid var(--gx-line); border-radius: 13px; background: #fff; transition: border-color .12s, background .12s; }
.pc-row.review { background: #fffbeb; border-color: #fde68a; }
.pc-row-h { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; width: 100%; padding: 11px 12px; border: 0; background: none; text-align: left; }
.pc-row-h .ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.pc-row.pass .ic, .pc-row.fixed .ic { background: #dcfce7; color: #15803d; }
.pc-row.fixed .ic { background: #dbeafe; color: #2563eb; }
.pc-row.review .ic { background: #fef3c7; color: #b45309; }
.pc-row-h .ic i[data-i] { width: 15px; height: 15px; }
.pc-row-h b { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.pc-row-h p { margin: 2px 0 0; color: var(--gx-muted); font-size: 12px; line-height: 1.4; }
.pc-row-h .pts { font-size: 11.5px; font-weight: 700; color: var(--gx-muted); padding-top: 3px; }
.pc-fix { display: flex; flex-direction: column; gap: 10px; margin: 0 12px 12px 48px; }
.pc-fix p { margin: 0; font-size: 12px; color: var(--gx-muted); }
.pc-fix .box { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 11px; background: #fff; border: 1px solid var(--gx-line); }
.pc-fix .box label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gx-muted); }
.pc-fix .gx-btn { align-self: flex-start; }
.pc-ring { position: relative; width: 52px; height: 52px; }
.pc-ring svg { transform: rotate(-90deg); }
.pc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.pc-score { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.pc-score small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--gx-muted); text-transform: uppercase; }
.pc-score b { font-size: 14px; }
.pc-swatches { display: flex; gap: 5px; align-items: center; }
.pc-swatches button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid #cbd5e1; background: var(--c); }
.pc-swatches button.on { outline: 2px solid var(--gx-dark); outline-offset: 2px; }
.pc-swatches button.checker { background-size: 7px 7px; }

/* FitCheck */
.fc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.fc-card { display: flex; flex-direction: column; border: 1px solid var(--gx-line); border-radius: 16px; overflow: hidden; background: #fff; }
.fc-card .art { position: relative; aspect-ratio: 1; overflow: hidden; background: linear-gradient(180deg, #f8fafc, #eef1f5); }
.fc-card .art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; padding: 7%; box-sizing: border-box; filter: drop-shadow(0 6px 10px rgb(15 23 42 / .10)); }
.fc-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.fc-card .meta b { display: block; font-size: 13px; }
.fc-card .meta small { color: var(--gx-muted); font-size: 11.5px; }
.fc-card .meta .gx-ib { width: 30px; height: 30px; }
.fc-size { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgb(255 255 255 / .9); font-size: 11px; font-weight: 700; box-shadow: var(--gx-shadow); }
.fc-colors { display: flex; align-items: center; gap: 7px; }
.fc-colors button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid #cbd5e1; background: var(--c); }
.fc-colors button.on { outline: 2px solid var(--gx-dark); outline-offset: 2px; }
.fc-big { display: grid; place-items: center; padding: 10px; }
.fc-big svg { width: min(640px, 100%); height: auto; }

/* Sticker and image editor */
.ed { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 480px; height: 100%; }
.ed-side { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-right: 1px solid var(--gx-line); overflow-y: auto; }
.ed-side .gx-h { margin: 0; }
.ed-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ed-tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 1px solid var(--gx-line); border-radius: 11px; background: #fff;
  font-size: 11.5px; font-weight: 650; color: var(--gx-muted); }
.ed-tabs button.on { border-color: var(--gx-dark); color: var(--gx-ink); background: var(--gx-soft); }
.ed-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--gx-line); border-radius: 13px; }
.ed-card b { font-size: 13px; }
.ed-card p { margin: 0; color: var(--gx-muted); font-size: 12px; }
.ed-view { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; background-size: 16px 16px; }
.ed-view > img, .ed-view > canvas { position: absolute; max-width: 90%; max-height: 90%; object-fit: contain; }
.ed-cmp { position: absolute; inset: 0; }
.ed-cmp .after { clip-path: inset(0 0 0 var(--cut, 50%)); }
.ed-cmp .knob { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); cursor: ew-resize; }
.ed-cmp .knob::after { content: "⇆"; position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 30px; height: 30px; margin: -15px; border-radius: 50%;
  background: #fff; box-shadow: var(--gx-shadow); font-size: 13px; color: var(--gx-ink); }
.ed-cmp .lbl { position: absolute; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgb(15 23 42 / .7); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; }
.ed-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgb(15 23 42 / .45); cursor: move; }
.ed-crop.circle { border-radius: 50%; }
.ed-crop i { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .2); }
.ed-crop i[data-h=nw] { left: -7px; top: -7px; cursor: nwse-resize; } .ed-crop i[data-h=ne] { right: -7px; top: -7px; cursor: nesw-resize; }
.ed-crop i[data-h=sw] { left: -7px; bottom: -7px; cursor: nesw-resize; } .ed-crop i[data-h=se] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.ed-ratios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ed-ratios button { height: 30px; padding: 0; border-radius: 8px; font-size: 11.5px; font-weight: 650; }
.ed-ratios button.on { border-color: var(--gx-dark); background: var(--gx-soft); }
.ed-pick { display: flex; align-items: center; gap: 8px; }
.ed-pick span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--gx-line); background: var(--c, #fff); flex: none; }

/* Auto Build, saved designs, download */
.ab-list { display: flex; flex-direction: column; gap: 8px; }
.ab-row { display: grid; grid-template-columns: 22px 46px 1fr 84px 84px 84px; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--gx-line); border-radius: 12px; }
.ab-row img { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background-size: 6px 6px; border: 1px solid var(--gx-line); }
.ab-row b { font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-row small { font-size: 11px; color: var(--gx-muted); }
.ab-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gx-dark); }
.ab-head { display: grid; grid-template-columns: 22px 46px 1fr 84px 84px 84px; gap: 10px; padding: 0 10px 4px; font-size: 11px; font-weight: 700; color: var(--gx-muted); text-transform: uppercase; letter-spacing: .04em; }
.ab-opts { display: grid; grid-template-columns: 1.5fr .9fr 1.2fr 1fr; gap: 12px; margin-bottom: 14px; }
.ab-head i { font-style: normal; text-transform: none; }
.ab-custom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 6px 10px; margin: -4px 0 14px; padding: 12px; border-radius: 12px; background: #f4f6fa; }
.ab-custom[hidden] { display: none; }
.ab-custom .ab-x { padding-bottom: 8px; color: var(--gx-muted); }
.ab-custom small { grid-column: 1 / -1; font-size: 11.5px; }
#abUnit button { height: 28px; }
.sv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sv-card { display: flex; flex-direction: column; border: 1px solid var(--gx-line); border-radius: 14px; overflow: hidden; }
.sv-card .th { height: 120px; display: grid; place-items: center; background-size: 10px 10px; }
.sv-card .th img { max-width: 100%; max-height: 100%; }
.sv-card .meta { padding: 10px 12px; }
.sv-card .meta b { display: block; }
.sv-card .meta small { color: var(--gx-muted); }
.sv-card .act { display: flex; gap: 6px; padding: 0 12px 12px; }
.sv-card .act .gx-btn { flex: 1; }
.dl-fmt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dl-fmt button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; height: auto; padding: 10px 12px; border-radius: 12px; text-align: left; }
.dl-fmt button b { font-size: 13.5px; }
.dl-fmt button small { color: var(--gx-muted); font-size: 11px; font-weight: 500; }
.dl-fmt button.on { border-color: var(--gx-dark); box-shadow: 0 0 0 3px rgb(17 24 39 / .08); }
.dl-issues { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dl-issues li { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 12.5px; }
.dl-issues li.ok { background: #f0fdf4; color: #166534; }
.gx-stack { display: flex; flex-direction: column; gap: 14px; }

/* the leave question of leave.js */
.pt-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgb(15 23 42 / .45); }
.pt-modal-box { width: min(420px, calc(100% - 32px)); padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--gx-pop); }
.pt-modal-box h2 { margin: 0 0 6px; font-size: 17px; }
.pt-modal-box p { margin: 0 0 16px; color: var(--gx-muted); }
.pt-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pt-modal-actions button { height: 36px; border-radius: 10px; font-weight: 600; }
.pt-modal-actions .danger { background: var(--gx-bad); border-color: var(--gx-bad); color: #fff; }

/* toasts */
.gx-toasts { position: fixed; left: 50%; bottom: 22px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.gx-toast { max-width: min(560px, 90vw); padding: 10px 16px; border-radius: 12px; background: var(--gx-dark); color: #fff; font-size: 13px; box-shadow: var(--gx-pop);
  animation: gx-rise .18s ease; pointer-events: auto; }
.gx-toast.bad { background: var(--gx-bad); }
.gx-toast.ok { background: #065f46; }

/* narrower windows: the sheets panel goes under, then the designs panel shrinks */
@media (max-width: 1280px) {
  .gx { grid-template-columns: 64px 270px minmax(0, 1fr) 224px; }
  .gx-rail-btn { width: 52px; }
}
@media (max-width: 1100px) {
  .gx { grid-template-columns: 64px 260px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .gx-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; border-left: 0; border-top: 1px solid var(--gx-line); max-height: 170px; overflow: auto; }
  .gx-sheets { flex-direction: row; max-height: none; overflow-x: auto; }
  .gx-sheet { min-width: 220px; }
  .gx-summary { margin: 0 10px; }
  .gx-right-actions { display: flex; border: 0; }
}
@media (max-width: 760px) {
  .gx-page { overflow: auto; }
  .gx { grid-template-columns: 1fr; grid-template-rows: auto auto 70vh auto; height: auto; }
  .gx-rail { flex-direction: row; justify-content: center; border-right: 0; border-bottom: 1px solid var(--gx-line); }
  .gx-left { border-right: 0; max-height: none; }
  .gx-lines { top: 10px; left: 10px; right: auto; bottom: auto; width: 180px; }
  .pc, .ed { grid-template-columns: 1fr; }
  .pc-list { display: flex; overflow-x: auto; border-right: 0; }
  .pc-checks { border-left: 0; }
  .fc-grid { grid-template-columns: 1fr 1fr; }
  .ab-row, .ab-head { grid-template-columns: 22px 40px 1fr 64px 64px 64px; }
}

/* the start screen */
.ss-modal .gx-dialog { width: min(860px, 100%); overflow: hidden; }
.ss-modal .gx-dhead { position: absolute; top: 0; right: 0; z-index: 2; border: 0; padding: 12px; }
.ss-modal .gx-dhead > div:first-child { display: none; }
.ss { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 440px; }
.ss-side { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 34px 30px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 80% at 0% 0%, #2a5bc4 0%, transparent 60%), linear-gradient(160deg, #2151b6 0%, #183f91 100%); }
.ss-kick { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: rgb(8 20 60 / .28); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ss-side h2 { margin: 8px 0 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.ss-side p { margin: 0; color: rgb(255 255 255 / .94); font-size: 13.5px; line-height: 1.55; }
.ss-art { width: 132px; margin-top: auto; align-self: flex-start; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .18)); }
.ss-main { display: flex; flex-direction: column; padding: 34px 32px 30px; }
.ss-main h3 { margin: 0 0 14px; font-size: 16px; }
.ss-main h4 { margin: 24px 0 10px; color: var(--gx-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ss-opts { display: flex; flex-direction: column; gap: 10px; }
.ss-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--gx-line); border-radius: 14px; background: #fff;
  color: var(--gx-ink); text-align: left; transition: border-color .12s, box-shadow .12s, transform .12s; }
.ss-opt:hover { border-color: #2151b6; box-shadow: 0 6px 18px rgb(33 81 182 / .12); transform: translateY(-1px); }
.ss-opt:focus-visible { outline: 2px solid #2151b6; outline-offset: 2px; }
.ss-oi { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #eaf0fb; color: #2151b6; }
.ss-oi i[data-i] { width: 21px; height: 21px; }
.ss-oi .ss-nn { color: #2151b6; }
.ss-opt:hover .ss-oi { background: #2151b6; color: #fff; }
.ss-opt:hover .ss-oi .ss-nn { color: #fff; }
.ss-ot { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ss-ot b { font-size: 14.5px; }
.ss-ot small { color: var(--gx-muted); font-size: 12.5px; line-height: 1.4; }
.ss-chev { font-style: normal; color: #64748b; font-size: 22px; line-height: 1; }
.ss-opt:hover .ss-chev { color: #2151b6; }
.ss-nn { display: inline-flex; flex-direction: column; align-items: center; line-height: .85; font-family: Oswald, Impact, sans-serif; }
.ss-nn b:first-child { font-size: 8px; letter-spacing: .02em; }
.ss-nn b:last-child { font-size: 14px; }
.ss-from { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ss-from button { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; color: var(--gx-ink);
  font-size: 13px; font-weight: 600; text-align: left; }
.ss-from button span { flex: 1; }
.ss-from button i[data-i] { width: 17px; height: 17px; color: #2151b6; }
.ss-from button em { font-style: normal; color: var(--gx-muted); font-size: 12px; font-weight: 500; }
.ss-from button:hover:not(:disabled) { border-style: solid; border-color: #2151b6; background: #fff; }
.ss-from button:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) { .ss { grid-template-columns: 1fr; } .ss-art { display: none; } .ss-side { padding: 26px 22px; } .ss-main { padding: 22px; } .ss-from { grid-template-columns: 1fr; } }

/* font menu and colour cards (Add Text, Names & Numbers) */
.fp-pop[hidden], .cc-pop[hidden], .tx-opts[hidden], .tx-hint[hidden], .nn2 [hidden] { display: none !important; }
.fp { position: relative; min-width: 0; }
.fp-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--gx-line); border-radius: 10px; background: #fff; color: var(--gx-ink); text-align: left; }
.fp-btn span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; }
.fp-btn:hover { border-color: #94a3b8; }
.fp-caret { font-style: normal; color: var(--gx-muted); font-size: 12px; }
.fp-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max(100%, 260px); padding: 8px; border: 1px solid var(--gx-line); border-radius: 12px; background: #fff; box-shadow: var(--gx-pop); }
.fp-pop.up, .cc-pop.up { top: auto; bottom: calc(100% + 6px); }
.fp-search { display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--gx-line); border-radius: 9px; color: var(--gx-muted); }
.fp-search input { border: 0 !important; outline: none !important; padding: 0 !important; height: 34px !important; }
.fp-list { max-height: 320px; overflow-y: auto; margin-top: 6px; }
.fp-h { display: block; padding: 10px 8px 4px; color: var(--gx-muted); font: 700 10.5px/1 Inter, -apple-system, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.fp-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--gx-ink); font-size: 17px; line-height: 1.2; text-align: left; }
.fp-opt:hover { background: var(--gx-soft); }
.fp-opt.on { background: color-mix(in srgb, var(--gx-sel) 10%, transparent); }
.fp-opt i[data-i] { width: 15px; height: 15px; color: var(--gx-sel); }
.cc { position: relative; min-width: 0; }
.cc-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 10px; border: 1px solid var(--gx-line); border-radius: 10px; background: #fff; color: var(--gx-ink); text-align: left; }
.cc-btn:hover { border-color: #94a3b8; }
.cc-sw { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgb(15 23 42 / .18); }
.cc-sw.off { border: 1.5px dashed #94a3b8; background: none; }
.cc-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cc-t small { color: var(--gx-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cc-t b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 236px; padding: 12px; border: 1px solid var(--gx-line); border-radius: 12px; background: #fff; box-shadow: var(--gx-pop); }
.gx-row2 > .cc:last-child .cc-pop { left: auto; right: 0; }
.cc-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.cc-row b { font-weight: 600; }
.cc-w { margin-bottom: 10px; }
.cc-w small { display: block; margin-bottom: 4px; color: var(--gx-muted); font-size: 11.5px; font-weight: 600; }
.cc-w .gx-in { width: 96px; }
.cc-w input:disabled { opacity: .5; }
.cc-grid { display: grid; grid-template-columns: repeat(7, 24px); gap: 6px; }
.cc-grid button, .cc-grid .gx-swatch-pick { width: 24px; height: 24px; padding: 0; border-radius: 6px; border: 1px solid rgb(15 23 42 / .15); background: var(--c, #fff); cursor: pointer; }
.cc-grid .gx-swatch-pick { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.cc-grid button.on { outline: 2px solid var(--gx-sel); outline-offset: 2px; }

/* Text panel (Add Text, Text Options): a tinted panel of white tiles */
.tx-top { display: flex; flex-direction: column; gap: 8px; }
.tx-launch { width: 100%; height: 42px; justify-content: center; gap: 9px; font-size: 14px; font-weight: 600; }
.tx-launch .ss-nn { color: var(--gx-ink); }
.tx-hint { margin: 2px 2px 0; font-size: 12.5px; }
.tx-opts { --tile: 0 1px 2px rgb(15 23 42 / .07), 0 0 0 1px rgb(15 23 42 / .03);
  display: flex; flex-direction: column; gap: 10px; margin: 4px -6px 0; padding: 14px 12px 16px; border-radius: 14px; background: #e6eaf1; }
.tx-head { display: flex; align-items: center; gap: 8px; }
.tx-th { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 9px; overflow: hidden; background-size: 8px 8px; box-shadow: var(--tile); }
.tx-th img { max-width: 90%; max-height: 90%; }
.tx-ht { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.tx-ht b { font-size: 14px; white-space: nowrap; }
.tx-ht small { color: var(--gx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-remove { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 5px; border: 0; border-radius: 8px; background: none; color: var(--gx-bad); font-weight: 600; font-size: 12.5px; }
.tx-remove:hover { background: #fde8e8; }
.tx-remove i[data-i] { width: 15px; height: 15px; }
.tx-head .gx-ib:hover { background: rgb(255 255 255 / .7); }
.tx-sub { margin: 10px 2px -2px; color: #5b6475; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.tx-opts textarea, .tx-opts input[type=number], .tx-opts select, .px input[type=number] { border-color: transparent !important; box-shadow: var(--tile); }
.tx-opts textarea:focus, .tx-opts input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gx-sel) 45%, transparent); }
.tx-opts .gx-field > label, .px .gx-field > label { color: #5b6475; }
.tx-size { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.tx-size .gx-lock { border-color: transparent; background: #fff; box-shadow: var(--tile); }
.tx-size .gx-dpi { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 4px; }
.tx-size .gx-dpi i[data-i] { width: 12px; height: 12px; }
.tx-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.tx-opts .tx-row select, .px .tx-row select { flex: 1 1 100px; min-width: 100px; padding: 0 2px; background-color: transparent; box-shadow: none; font-size: 12.5px; color: var(--gx-ink); cursor: pointer; }
.tx-qty { display: flex; align-items: center; gap: 5px; }
.tx-qty small { color: #5b6475; font-size: 11.5px; }
.tx-qty .gx-stepper { display: flex; gap: 4px; border: 0; border-radius: 0; overflow: visible; }
.tx-qty .gx-stepper button, .tx-qty .gx-stepper input { height: 34px; border-radius: 9px !important; background: #fff; box-shadow: var(--tile); }
.tx-qty .gx-stepper button { width: 28px; color: var(--gx-ink); font-size: 18px; }
.tx-qty .gx-stepper button:hover { background: #f8fafc; }
.tx-qty .gx-stepper input { width: 34px; padding: 0; font-size: 14px; font-weight: 600; }
.tx-font { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tx-opts .fp-btn, .tx-opts .cc-btn { border-color: transparent; box-shadow: var(--tile); }
.tx-opts .fp-btn:hover, .tx-opts .cc-btn:hover { border-color: transparent; box-shadow: 0 0 0 1px #94a3b8; }
.tx-align { background: #fff; box-shadow: var(--tile); }
.tx-align button { flex: none; width: 28px; padding: 0; display: grid; place-items: center; }
.tx-align button.on { background: #e6eaf1; box-shadow: none; }
.tx-align i[data-i] { width: 16px; height: 16px; }
.tx-opts input[type=range] { accent-color: #2151b6; }
.tx-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tx-acts button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; line-height: 1.2; min-height: 66px; padding: 9px 4px 8px; border: 0; border-radius: 10px;
  background: #fff; box-shadow: var(--tile); color: var(--gx-ink); font-size: 11px; font-weight: 500; letter-spacing: .005em; transition: box-shadow .12s, background .12s; }
.tx-acts button:hover { box-shadow: 0 0 0 1px #94a3b8, 0 2px 6px rgb(15 23 42 / .08); }
.tx-acts button:active { background: #f1f5f9; }
.tx-acts i[data-i] { width: 17px; height: 17px; color: var(--gx-ink); }
.tx-garm { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid #9aa4b4; border-radius: 12px; background: #fff; color: var(--gx-ink); font-size: 13px; font-weight: 600; }
.tx-garm:hover { border-color: #64748b; }
.tx-garm i[data-i] { width: 18px; height: 18px; color: #2151b6; }
.tx-garm span { flex: 1; text-align: left; }
.tx-garm b { color: var(--gx-muted); font-size: 17px; font-weight: 400; }

/* Names & Numbers */
.gx-dialog.nn-dialog { width: min(820px, 100%); max-height: min(800px, calc(100vh - 40px)); }
.nn2-modal .gx-dhead { border: 0; padding-bottom: 6px; }
.nn2-modal .gx-dhead h2 { display: flex; align-items: center; gap: 8px; }
.nn2-logo { color: var(--gx-ink); }
.nn2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; padding: 6px 20px 18px; }
.nn2-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nn2-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nn2-mode button { height: 34px; }
.nn2-cap { color: var(--gx-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nn2-rh { display: flex; align-items: center; gap: 6px; margin-bottom: -6px; }
.nn2-paste { color: #2151b6; }
.nn2-ghost { cursor: pointer; }
.nn2-rh i[data-i] { width: 15px; height: 15px; }
.nn2-roster { padding: 12px; border: 1px solid #c7d2fe; border-radius: 12px; background: #f8faff; }
.nn2-grid { display: grid; grid-template-columns: 18px minmax(0, 1fr) 64px 104px 30px; gap: 6px 8px; align-items: center; max-height: 230px; overflow-y: auto; padding-right: 2px; }
.nn2-grid > span { color: var(--gx-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nn2-grid em { font-style: normal; color: var(--gx-muted); font-size: 12px; text-align: right; }
.nn2-grid input[data-k="number"] { text-align: center; }
.nn2-grid input { height: 36px !important; }
.nn2-grid .gx-ib { width: 30px; height: 30px; color: var(--gx-muted); }
.nn2-grid .gx-ib i[data-i] { width: 16px; height: 16px; }
.nn2-grid.no-name { grid-template-columns: 18px 0 minmax(0, 1fr) 104px 30px; }
.nn2-grid.no-num { grid-template-columns: 18px minmax(0, 1fr) 0 104px 30px; }
.nn2-grid.no-name > :nth-child(5n+2), .nn2-grid.no-num > :nth-child(5n+3) { visibility: hidden; overflow: hidden; padding: 0 !important; border: 0 !important; min-width: 0; width: 0; }
.nn2-q { height: 36px; grid-template-columns: 30px 1fr 30px; background: #fff; }
.nn2-q input { height: 34px !important; padding: 0 !important; }
.nn2-rfoot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e0e7ff; color: var(--gx-muted); font-size: 12.5px; }
.nn2-rfoot b { color: var(--gx-ink); }
.nn2-rfoot .gx-btn { background: #fff; }
.nn2-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nn2-sizes button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 6px; border: 1px solid var(--gx-line); border-radius: 10px; background: #fff; color: var(--gx-ink); }
.nn2-sizes button b { font-size: 13px; font-weight: 600; }
.nn2-sizes button small { color: var(--gx-muted); font-size: 11px; }
.nn2-sizes button.on { border-color: #94a3b8; background: var(--gx-soft); box-shadow: inset 0 0 0 1px #94a3b8; }
.nn2-compact { display: flex; align-items: center; gap: 6px; }
.nn2-tip { position: relative; display: inline-grid; color: var(--gx-muted); cursor: help; }
.nn2-tip i[data-i] { width: 15px; height: 15px; }
.nn2-tip:hover::after, .nn2-tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 220px; padding: 8px 10px;
  border-radius: 8px; background: #111827; color: #fff; font-size: 12px; line-height: 1.35; z-index: 5; }
.nn2-sp-h { display: flex; align-items: center; justify-content: space-between; }
.nn2-larger { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #2151b6; font-size: 12.5px; font-weight: 600; }
.nn2-larger i[data-i] { width: 13px; height: 13px; }
.nn2-sheet { display: grid; place-items: start center; min-height: 300px; padding: 12px; border: 1px solid var(--gx-line); border-radius: 12px; background: #fff; }
.nn2-sheet canvas { background-color: #fff; background-image: conic-gradient(#eef0f3 25%, #fff 0 50%, #eef0f3 0 75%, #fff 0); background-size: 10px 10px; box-shadow: 0 0 0 1px var(--gx-line); }
.nn2-stats { margin: 0; color: var(--gx-muted); font-size: 12px; }
.nn2-stats b { color: var(--gx-ink); }
.nn2-info { display: flex; gap: 6px; margin: 0; padding: 8px 10px; border-radius: 9px; background: #fff7ed; color: #9a3412; font-size: 12px; }
.nn2-info i[data-i] { width: 15px; height: 15px; }
.nn2-tidy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #c7d2fe; border-radius: 10px; background: #f8faff; cursor: pointer; }
.nn2-tidy.on { border-color: #2151b6; box-shadow: inset 0 0 0 1px #2151b6; }
.nn2-tidy input { width: 18px; height: 18px; accent-color: #2151b6; }
.nn2-tidy .ic { color: #2151b6; display: inline-grid; }
.nn2-tidy span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.nn2-tidy b { font-size: 13px; }
.nn2-tidy small { color: var(--gx-muted); font-size: 11.5px; }
.nn2-margin { max-width: 130px; }
.nn2-pl .gx-dhead h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.nn2-pl .gx-pad { display: flex; flex-direction: column; gap: 10px; }
.nn2-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nn2-acc span { color: var(--gx-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-right: 2px; }
.nn2-acc code { padding: 3px 8px; border-radius: 6px; background: var(--gx-soft); border: 1px solid var(--gx-line); font-size: 12px; }
.nn2-pl textarea { min-height: 170px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 13px; }
.nn2-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.nn2-check input { width: 16px; height: 16px; accent-color: #2151b6; }
@media (max-width: 760px) { .nn2 { grid-template-columns: 1fr; } }
.tx-opts { container-type: inline-size; }
@container (max-width: 250px) { .tx-remove span { display: none; } }
/* a text selected: its Text Options panel replaces the design panel (sizes, image tools) */
.gx-left:has(.tx-opts:not([hidden])) #props { display: none; }

/* the design panel: the same tinted panel of white tiles */
.gx-props.px { --tile: 0 1px 2px rgb(15 23 42 / .07), 0 0 0 1px rgb(15 23 42 / .03);
  gap: 10px; margin: 0 -6px; padding: 14px 10px 16px; border: 0; border-radius: 14px; background: #e6eaf1; container-type: inline-size; }
.px .gx-sel-card { grid-template-columns: 44px 1fr; }
.px .gx-sel-thumb { width: 44px; height: 44px; border: 0; background-color: #fff; box-shadow: var(--tile); }
.px-size { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px auto; gap: 8px; align-items: end; }
.px-size .gx-lock { height: 34px; border-color: transparent; background: none; color: #2151b6; }
.px-size .gx-lock.on { background: none; color: #2151b6; }
.px-size .gx-lock:hover { background: rgb(255 255 255 / .7); }
.px-size .gx-dpi { align-self: center; margin-top: 18px; padding: 0; background: none; font-size: 12.5px; font-weight: 600; }
.px-size .gx-dpi.ok::before, .px-size .gx-dpi.vec::before { content: "✓"; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 4px;
  border: 1.5px solid currentColor; border-radius: 50%; font-size: 9px; line-height: 1; }
.px-size .gx-dpi.ok, .px-size .gx-dpi.vec { color: #166534; }
@container (max-width: 250px) { .px-size { grid-template-columns: 1fr 1fr 30px; } .px-size .gx-dpi { grid-column: 1 / -1; justify-self: start; margin-top: 0; } }
.px .gx-tool.hero { margin-top: 2px; }
.px .tx-acts button.on { background: #dce4f5; box-shadow: inset 0 0 0 1.5px #8299d6; color: #2151b6; }
.px .tx-acts button.on i[data-i] { color: #2151b6; }
.tx-acts button:disabled { opacity: .45; cursor: default; box-shadow: var(--tile); }
.tx-acts .px-tick { position: absolute; top: 5px; right: 5px; width: 14px !important; height: 14px !important; color: #2151b6 !important; }
.px .gx-adjust { border: 0; background: #fff; box-shadow: var(--tile); }
.px .px-pos { margin-top: 2px; }
.px-edges { position: relative; }
.px .px-edge { border: 0; box-shadow: var(--tile); }
.px .px-edge:hover { box-shadow: 0 0 0 1px #94a3b8; }
.px-edge i[data-i] { color: #334155 !important; }
.px-edge em { font-style: normal; color: var(--gx-muted); font-weight: 500; font-size: 12.5px; }
.px-menu { position: absolute; z-index: 25; left: 0; right: 0; bottom: calc(100% + 6px); display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 12px; background: #fff; box-shadow: var(--gx-pop); }
.px-menu[hidden] { display: none !important; }
.px-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--gx-ink); text-align: left; }
.px-menu button:hover { background: var(--gx-soft); }
.px-menu b { font-size: 13px; }
.px-menu small { color: var(--gx-muted); font-size: 11.5px; }
.px .gx-adjust summary { padding: 10px 0; font-size: 12px; font-weight: 600; }
.px .gx-field > label, .tx-opts .gx-field > label { font-size: 11px; }
.px .gx-in input, .tx-opts .gx-in input { font-size: 12.5px; }
.px .gx-sel-meta b { font-size: 13px; }
.px .gx-tool.hero b { font-size: 13px; }
.px .gx-tool.hero small { font-size: 11px; }
.gx-right-foot .gx-btn { width: 100%; height: 42px; justify-content: center; }
.gx-sheet-act .gx-grow { flex: 1 1 0; min-width: 0; }
.gx-sheet-act .gx-stepper button { padding: 0; font-size: 14px; }

/* Edit Colors / Knockout Colors */
.gx-dialog.ec-dialog { width: min(700px, 100%); }
.ec { display: flex; flex-direction: column; gap: 14px; padding: 2px 24px 20px; }
.ec-lead { margin: 0; color: var(--gx-muted); font-size: 13.5px; line-height: 1.55; }
.ec-view { position: relative; display: grid; place-items: center; height: 300px; padding: 14px; border-radius: 10px; overflow: hidden; }
.ec-stage { --x: 50%; position: relative; display: grid; max-width: 100%; max-height: 272px; line-height: 0; touch-action: none; }
.ec-stage canvas { grid-area: 1 / 1; max-width: 100%; max-height: 272px; }
.ec-view:not(.cmp) .ec-orig, .ec-view:not(.cmp) .ec-split, .ec-view:not(.cmp) .ec-tag { display: none; }
.ec-view.cmp .ec-orig { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ec-view.cmp .ec-res { clip-path: inset(0 0 0 var(--x)); }
.ec-view.cmp .ec-stage { cursor: ew-resize; }
.ec-split { position: absolute; top: -14px; bottom: -14px; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 .5px rgb(15 23 42 / .15); }
.ec-split i { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgb(15 23 42 / .22); color: #334155; }
.ec-split i svg { width: 16px; height: 16px; transform: rotate(90deg); }
.ec-tag { position: absolute; top: 12px; padding: 4px 9px; border-radius: 6px; background: rgb(55 65 81 / .85); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; pointer-events: none; }
.ec-tag.l { left: 12px; } .ec-tag.r { right: 12px; }
.ec-tick { position: absolute; inset: 0; display: none; place-items: center; color: #111827; }
.ec-tick svg { width: 22px; height: 22px; }
.ec-sw.ko .ec-chip { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 10px 10px; box-shadow: inset 0 0 0 2.5px #111827, 0 0 0 3px #fff, 0 0 0 4.5px #94a3b8; }
.ec-sw.ko .ec-tick { display: grid; }
.ec-sw.ko .ec-new { display: none; }
.ec-sw.ko .ec-bar b { background: #94a3b8; }
.ec-sw.ko small { text-decoration: line-through; }
.ec-reset i[data-i] { width: 16px; height: 16px; }
.ec-h { margin: 4px 0 0; font-size: 15px; font-weight: 650; }
.ec-pal { display: flex; flex-wrap: wrap; gap: 12px; }
.ec-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 52px; padding: 0; border: 0; background: none; cursor: pointer; }
.ec-chip { position: relative; display: block; width: 48px; height: 48px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(15 23 42 / .14); overflow: visible; }
.ec-sw.on .ec-chip { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2151b6; }
.ec-new { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; border-radius: 0 0 8px 8px; }
.ec-new.gone { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 8px 8px !important; }
.ec-new.gone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), #dc2626 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.ec-chip em { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); padding: 3px 6px; border-radius: 6px; background: #1f2937; color: #fff; font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2; }
.ec-sw:hover .ec-chip em, .ec-sw:focus-visible .ec-chip em { opacity: 1; }
.ec-bar { display: block; width: 48px; height: 4px; border-radius: 2px; background: #e5e7eb; overflow: hidden; }
.ec-bar b { display: block; height: 100%; background: #2151b6; }
.ec-sw small { color: var(--gx-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ec-to { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: #f4f6fa; }
.ec-to[hidden] { display: none !important; }
.ec-to-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; }
.ec-to-h span { display: inline-flex; align-items: center; gap: 6px; }
.ec-dot { display: inline-block; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(15 23 42 / .15); }
.ec-from-t { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gx-muted); }
.ec-undo { padding: 0; border: 0; background: none; color: #2151b6; font-size: 12.5px; font-weight: 600; }
.ec-undo[hidden] { display: none; }
.ec-grid { grid-template-columns: repeat(14, 24px); }
.ec-tol { max-width: 280px; }
.ec-note { color: var(--gx-muted); font-size: 12.5px; }
@media (max-width: 640px) { .ec-grid { grid-template-columns: repeat(7, 24px); } }
.gx-toolbar { container-type: inline-size; }
@container (max-width: 960px) { .gx-kind span { display: none; } .gx-kind { padding-left: 2px; } }
@media (max-width: 760px) { .ab-opts { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- accessibility (WCAG 2.2 AA)
   colours above: text at least 4.5:1 on every panel colour, field edges 3:1 */
.gx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.gx-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: 9px; background: var(--gx-dark); color: #fff; font-weight: 700; text-decoration: none; }
.gx-skip:focus { top: 10px; }
.gx-a11y-link { margin-left: auto; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: #475569; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gx-a11y-link:hover { color: #2151b6; background: var(--gx-soft); }
.gx-a11y-link + .back { margin-left: 8px; }
/* a visible focus ring on everything that takes the keyboard */
.gx-page :focus-visible { outline: 2px solid var(--gx-sel) !important; outline-offset: 2px; }
.gx-page input:focus-visible, .gx-page select:focus-visible, .gx-page textarea:focus-visible { outline-offset: 0; }
.gx-stage canvas:focus-visible { outline: 3px solid var(--gx-sel) !important; outline-offset: -3px; }
.gx-kind:focus-within, .gx-stepper:focus-within, .fp-search:focus-within { outline: 2px solid var(--gx-sel); outline-offset: 1px; }
/* field edges you can see (3:1) */
.gx-page select, .gx-page input[type=number], .gx-page textarea, .gx-page input[type=text], .gx-page input[type=color],
.gx-stepper, .gx-kind { border-color: var(--gx-field); }
/* targets at least 24 x 24 px */
.gx-sheet-act .gx-stepper { grid-template-columns: 24px 28px 24px; height: 26px; }
/* narrow screens and 400% zoom: nothing wider than the window */
@media (max-width: 760px) {
  .top { height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 4px; padding: 8px 16px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-name { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
  .gx-right-actions { flex-wrap: wrap; }
  .gx-toolbar { flex-wrap: wrap; overflow: visible; }
  .gx-sheet { min-width: 0; }
}
/* less movement for people who ask for it */
@media (prefers-reduced-motion: reduce) {
  .gx-page *, .gx-page *::before, .gx-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .gx-spin { animation: none !important; border-top-color: currentColor; }
}
.gx-a11y-help h3 { margin: 6px 0 0; font-size: 14px; }
.gx-a11y-help p, .gx-a11y-help ul { margin: 0; line-height: 1.55; }
.gx-a11y-help ul { padding-left: 18px; display: grid; gap: 6px; }
.gx-a11y-help a { color: #2151b6; font-weight: 600; }
.gx-dialog:focus { outline: none !important; }
.gx-notips .nn2-tip::after, .gx-notips .nn2-tip::before { display: none !important; }
/* the Magic Eraser: the selection over the picture, and the keyboard pointer */
.ed-view > canvas.ed-erase { position: absolute; max-width: none; max-height: none; pointer-events: none; image-rendering: pixelated; }
.ed-cross { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #111827, inset 0 0 0 1px #111827; pointer-events: none; }
.ed-cross[hidden] { display: none; }
.ed-sel { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--gx-ink); }
