#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-app { --lgs-wood: #b8652a; --lgs-wood-soft: #8a6d4d; --lgs-deep: #6366f1; display: flex; flex-direction: column; gap: 22px; color: var(--text-primary); }
html[data-theme="dark"] #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-app { --lgs-wood: #d97706; --lgs-wood-soft: #a1866a; --lgs-deep: #818cf8; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-fieldset { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px 18px 18px; margin: 0 0 14px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-legend { padding: 0 6px; font-weight: 600; font-size: 0.95rem; color: var(--text-secondary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-field { display: flex; flex-direction: column; gap: 6px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-hint { font-size: 0.82rem; line-height: 1.35; color: var(--text-muted); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-check { width: 22px; height: 22px; accent-color: var(--accent-primary); margin-top: 6px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-outcome { display: flex; flex-direction: column; gap: 18px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tb-zone[data-tb-zone="outcome"] > * + * { margin-top: 18px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--border-color); border-top: 3px double var(--text-secondary); border-radius: var(--radius-md); background: var(--bg-secondary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-main { padding: 14px 18px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-row { min-width: 0; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-value { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; color: var(--text-primary); line-height: 1.25; overflow-wrap: break-word; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cells { display: grid; grid-template-rows: repeat(3, 1fr); border-left: 1px solid var(--border-color); min-width: 132px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cell { padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-color); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cell:last-child { border-bottom: 0; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-cell-label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-cell-val { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-note { font-size: 0.88rem; color: var(--text-secondary); margin: 0; line-height: 1.45; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-wrap { display: flex; flex-direction: column; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-scale { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan { display: flex; gap: 8px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-nums { position: relative; width: 20px; flex: none; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-num { position: absolute; right: 2px; font-size: 0.66rem; line-height: 1; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-field { position: relative; flex: 1 1 auto; min-width: 0; border: 1px solid var(--border-color); border-radius: 2px; background: var(--bg-secondary); overflow: hidden; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-lap { position: absolute; width: 48.5%; box-sizing: border-box; border: 1px solid var(--lgs-wood); border-radius: 2px; background: rgba(184, 101, 42, 0.13); }
html[data-theme="dark"] #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-lap { background: rgba(217, 119, 6, 0.18); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-lap-first { border-color: var(--lgs-deep); border-width: 1.5px; background: rgba(99, 102, 241, 0.15); }
html[data-theme="dark"] #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-lap-first { background: rgba(129, 140, 248, 0.2); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-walk { position: absolute; left: 0; top: 0; color: var(--lgs-wood); pointer-events: none; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-dim { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-dim-rule { flex: 1 1 auto; height: 1px; background: var(--text-muted); position: relative; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-dim-rule::before, #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-dim-rule::after { content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--text-muted); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-dim-rule::before { left: 0; } #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-dim-rule::after { right: 0; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-dim span:not(.lgs-dim-rule) { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-plan-cap { font-size: 0.82rem; color: var(--text-muted); margin: 10px 0 0; line-height: 1.45; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-wrap { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px 12px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-val { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-ruler { position: relative; height: 30px; margin: 0 34px; border-bottom: 2px solid var(--text-secondary); background-color: transparent; background-image: repeating-linear-gradient(90deg, var(--text-muted) 0 1px, transparent 1px calc(100% / 12)), repeating-linear-gradient(90deg, var(--text-secondary) 0 1px, transparent 1px calc(100% / 6)); background-size: 100% 8px, 100% 15px; background-position: left bottom, left bottom; background-repeat: no-repeat, no-repeat; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-ruler-zone { position: absolute; left: 33.333%; width: 16.667%; top: 0; bottom: 0; background: var(--success); opacity: 0.16; border-left: 1px solid var(--success); border-right: 1px solid var(--success); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-ruler-marker { position: absolute; top: -22px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--lgs-wood); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-ruler-flag { position: absolute; bottom: calc(100% + 4px); left: 0; transform: translateX(-50%); font-size: 0.76rem; font-weight: 700; color: var(--text-primary); background: var(--bg-secondary); border: 1px solid var(--lgs-wood); border-radius: 3px; padding: 1px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-scale { display: flex; justify-content: space-between; margin: 4px 34px 0; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-formula { font-size: 0.88rem; color: var(--text-secondary); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-cap { font-size: 0.82rem; color: var(--text-muted); margin: 6px 0 0; line-height: 1.4; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-derived { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-color); border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-derived-item { background: var(--bg-secondary); padding: 11px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-result-value { font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-top: 3px double var(--text-secondary); border-radius: var(--radius-md); }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-table-caption { caption-side: top; text-align: left; padding: 10px 14px 8px; font-weight: 600; font-size: 0.9rem; color: var(--text-primary); border-bottom: 1px solid var(--border-color); }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table th { padding: 9px 14px 7px; text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); border-bottom: 1px solid var(--text-secondary); white-space: nowrap; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table td { padding: 8px 14px; text-align: left; border-top: 1px solid var(--border-color); vertical-align: top; color: var(--text-secondary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table tbody tr:first-child td { border-top: none; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table td:first-child { font-weight: 600; color: var(--text-primary); }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table th:nth-child(2), #js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table td:nth-child(2) { text-align: right; white-space: nowrap; }
#js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-table td:nth-child(4) { font-size: 0.82rem; color: var(--text-muted); }
#js-tool-container-lestnica-gusinyj-shag-calculator .lgs-limits { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin: 12px 0 0; }
@media (max-width: 600px) { #js-tool-container-lestnica-gusinyj-shag-calculator .tbcalc-grid-2 { grid-template-columns: 1fr; } #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-derived { grid-template-columns: 1fr; } #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-gauge-scale { font-size: 0.7rem; } }

@media (max-width: 560px) {
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero { grid-template-columns: 1fr; }
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cells { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: none; border-top: 1px solid var(--border-color); min-width: 0; }
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cell { padding: 8px 10px; }
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cell { flex-direction: column; align-items: flex-start; gap: 2px; border-bottom: none; border-right: 1px solid var(--border-color); }
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-hero-cell:last-child { border-right: none; }
  #js-tool-container-lestnica-gusinyj-shag-calculator .lgs-cell-label { font-size: 0.68rem; }
}