  .weight-calc-page {
    --wc-ink: #333333;
    --wc-muted: #666666;
    --wc-line: #E5E5E5;
    --wc-accent: #00A3A0;
    --wc-accent-dark: #007A78;
    --wc-accent-pale: #E6F6F5;
    --wc-accent-mid: #7BC4C2;
    --wc-accent-rgb: 0, 163, 160;
    --wc-chrome: 0;
    --wc-text: #212529;
    --wc-secondary: rgba(33, 37, 41, 0.75);
    --wc-border: #dee2e6;
    --wc-card-border: rgba(0, 0, 0, 0.175);
    --wc-danger: #dc3545;
    color: var(--wc-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  .weight-calc-page,
  .weight-calc-page *,
  .weight-calc-page *::before,
  .weight-calc-page *::after {
    box-sizing: border-box;
  }

  .weight-calc-page [hidden] {
    display: none !important;
  }

  .weight-calc-page h2,
  .weight-calc-page h3,
  .weight-calc-page p {
    margin: 0;
  }

  .weight-calc-page button,
  .weight-calc-page input,
  .weight-calc-page select {
    margin: 0;
    font: inherit;
  }

  .weight-calc-page button,
  .weight-calc-page select {
    text-transform: none;
  }

  .weight-calc-page button:not(:disabled) {
    cursor: pointer;
  }

  .weight-calc-page button:focus-visible {
    outline: 2px solid var(--wc-accent-dark);
    outline-offset: 2px;
  }

  .weight-calc-layout {
    padding: 1rem;
    background: #fff;
  }

  .weight-calc-page .weight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: break-word;
    background: #fff;
    background-clip: border-box;
    border: 1px solid var(--wc-card-border);
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }

  .weight-calc-page .weight-card-body {
    flex: 1 1 auto;
    padding: 1rem;
  }

  .weight-calc-page .weight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid var(--wc-card-border);
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
  }

  .weight-calc-page .weight-card-footer {
    background: #fff;
    border-top: 1px solid var(--wc-card-border);
    border-radius: 0 0 calc(0.375rem - 1px) calc(0.375rem - 1px);
  }

  .weight-calc-page .weight-material-section {
    margin-bottom: 1rem;
  }

  .weight-calc-page .weight-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .weight-calc-page .weight-divider {
    height: 0;
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid currentColor;
    opacity: 0.25;
  }

  .weight-calc-page .weight-field-label {
    display: inline-block;
    margin-bottom: 0.25rem;
    color: var(--wc-secondary);
    font-size: 0.875rem;
  }

  .weight-calc-page .weight-input,
  .weight-calc-page .weight-select {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    color: var(--wc-text);
    appearance: none;
    background-color: #fff;
    border: 1px solid var(--wc-border);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }

  .weight-calc-page .weight-select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
  }

  .weight-calc-page .weight-input:disabled,
  .weight-calc-page .weight-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
  }

  .weight-calc-page .weight-input:focus,
  .weight-calc-page .weight-select:focus {
    border-color: var(--wc-accent-mid);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--wc-accent-rgb), 0.25);
  }

  .weight-calc-page .weight-input[aria-invalid="true"] {
    border-color: var(--wc-danger);
  }

  .weight-calc-page .weight-input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
  }

  .weight-calc-page .weight-field-error {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    color: var(--wc-danger);
    font-size: 0.875rem;
  }

  .weight-calc-page .weight-input[aria-invalid="true"] ~ .weight-field-error {
    display: block;
  }

  .weight-calc-page .weight-button {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    color: var(--wc-text);
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
      border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }

  .weight-calc-page .weight-button:disabled {
    pointer-events: none;
    opacity: 0.65;
  }

  .weight-calc-page .weight-button-primary {
    color: #fff;
    background: var(--wc-accent);
    border-color: var(--wc-accent);
  }

  .weight-calc-page .weight-button-primary:hover,
  .weight-calc-page .weight-button-primary:active {
    background: var(--wc-accent-dark);
    border-color: var(--wc-accent-dark);
  }

  .weight-calc-page .weight-button-outline {
    color: var(--wc-accent);
    border-color: var(--wc-accent);
  }

  .weight-calc-page .weight-button-outline:hover,
  .weight-calc-page .weight-button-outline:active {
    color: #fff;
    background: var(--wc-accent);
  }

  .weight-calc-page .weight-button-outline:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(var(--wc-accent-rgb), 0.35);
  }

  .weight-calc-page .weight-button-secondary {
    color: #fff;
    background: #6c757d;
    border-color: #6c757d;
  }

  .weight-calc-page .weight-button-secondary:hover,
  .weight-calc-page .weight-button-secondary:active {
    background: #5c636a;
    border-color: #565e64;
  }

  .weight-calc-page .weight-catalog-open {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
  }

  .weight-calc-page .weight-catalog-count {
    display: inline-block;
    padding: 0.35em 0.65em;
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    background: var(--wc-accent);
    border-radius: 50rem;
  }

  .weight-calc-page .weight-catalog-group {
    margin-bottom: 1.5rem;
  }

  .weight-calc-page .weight-catalog-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .weight-calc-page .weight-catalog-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .weight-calc-page .weight-catalog-group-count,
  .weight-calc-page .weight-shape-subtitle {
    color: var(--wc-secondary);
    font-size: 0.875rem;
  }

  .weight-calc-page .weight-shape-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .weight-calc-page .weight-shape-title {
    font-size: min(calc(1.275rem + 0.3vw), 1.5rem);
    font-weight: 700;
    line-height: 1.2;
  }

  .weight-calc-page .weight-result-unit {
    color: var(--wc-secondary);
    font-weight: 700;
  }

  .weight-calc-page .weight-step {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: var(--wc-accent);
    border-radius: 0.35rem;
  }

  .weight-calc-page .weight-material-fields {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .weight-calc-page .weight-material-select {
    flex: 1;
    min-width: 0;
  }

  .weight-calc-page .weight-density-field {
    flex: 0 0 40%;
    min-width: 0;
  }

  .weight-calc-page .shape-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    min-height: 5.5rem;
    padding: 0.4rem 0.25rem;
    border: 1px solid var(--wc-line);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--wc-ink);
  }

  .weight-calc-page .shape-btn:hover {
    background: var(--wc-accent-pale);
    border-color: var(--wc-accent-mid);
  }

  .weight-calc-page .shape-btn.is-active,
  .weight-calc-page .shape-btn[aria-pressed="true"] {
    border-color: var(--wc-accent);
    box-shadow: 0 0 0 2px rgba(var(--wc-accent-rgb), 0.18);
    background: var(--wc-accent-pale);
  }

  .weight-calc-page .shape-btn-name {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
  }

  .weight-calc-page .shape-icon {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
  }

  .weight-calc-page .shape-icon.shape-icon--wide {
    width: 80px;
    height: 40px;
  }

  .weight-calc-page .drawing-wrap {
    --wc-drawing-ar: 9000 / 5716;
    --wc-drawing-pad-y: 1.5rem;
    --wc-drawing-pad-x: 2rem;
    position: relative;
    width: min(100%, 760px);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    aspect-ratio: var(--wc-drawing-ar);
    background: #e9ecef;
    border: 1px solid var(--wc-line);
    border-radius: 0.5rem;
    display: grid;
    overflow: hidden;
    padding: var(--wc-drawing-pad-y) var(--wc-drawing-pad-x);
    box-sizing: border-box;
  }

  .weight-calc-page .drawing-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
  }

  .weight-calc-page .drawing-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    pointer-events: none;
    user-select: none;
  }

  .weight-calc-page #dimension_controls {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
  }

  .weight-calc-page #dimension_controls .dimension-control {
    pointer-events: auto;
  }

  @media (min-width: 992px) {
    .container-fluid.weight-calc-page {
      box-sizing: border-box;
    }

    .container-fluid.weight-calc-page > .weight-calc-row {
      align-items: stretch;
    }

    .container-fluid.weight-calc-page .weight-sidebar,
    .container-fluid.weight-calc-page .weight-main-card {
      height: 100%;
    }

    .container-fluid.weight-calc-page .weight-main-card > .weight-card-body {
      display: flex;
      align-items: center;
      justify-content: center;
      padding-top: 0.75rem;
      padding-bottom: 0.75rem;
    }

    .container-fluid.weight-calc-page .drawing-wrap {
      width: min(100%, 760px);
      max-width: 100%;
      height: auto;
      aspect-ratio: var(--wc-drawing-ar);
    }
  }

  .weight-calc-page .drawing-hint {
    position: absolute;
    left: 0.75rem;
    bottom: 0.5rem;
    z-index: 2;
    margin: 0;
    padding: 0.15rem 0.4rem;
    color: var(--wc-muted);
    font-size: 0.7rem;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 0.25rem;
    pointer-events: none;
  }

  .weight-calc-page .dimension-control {
    --wc-dim-input-w: 4.55rem;
    --wc-dim-gap: 0;
    --wc-dim-pad-y: 0.1rem;
    --wc-dim-pad-x: 0.1rem;
    --wc-dim-radius: 0.5rem;
    --wc-dim-symbol: 1.3rem;
    --wc-dim-symbol-fs: 0.7rem;
    --wc-dim-symbol-radius: 0.3rem;
    --wc-dim-input-fs: 1rem;
    --wc-dim-unit-fs: 0.65rem;

    position: absolute;
    display: grid;
    grid-template-columns: auto var(--wc-dim-input-w) auto;
    align-items: center;
    gap: var(--wc-dim-gap);
    padding: var(--wc-dim-pad-y) var(--wc-dim-pad-x);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #83afc2;
    border-radius: var(--wc-dim-radius);
    box-shadow: 0 5px 16px rgba(20, 55, 70, 0.15);
    transform: translate(-50%, -50%);
    z-index: 3;
  }

  .weight-calc-page .dimension-symbol {
    display: grid;
    place-items: center;
    min-width: var(--wc-dim-symbol);
    height: var(--wc-dim-symbol);
    color: #fff;
    font-size: var(--wc-dim-symbol-fs) !important;
    font-weight: 800;
    background: var(--wc-accent);
    border-radius: var(--wc-dim-symbol-radius);
  }

  .weight-calc-page .dimension-control input {
    width: var(--wc-dim-input-w);
    height: 30px;
    min-width: 0;
    padding: 0.1rem 0.3rem;
    border: 0;
    border-radius: 0;
    text-align: end;
    font-size: var(--wc-dim-input-fs) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: transparent;
  }

  .weight-calc-page .dimension-unit {
    display: block;
    color: var(--wc-muted);
    font-size: var(--wc-dim-unit-fs) !important;
    font-weight: 700;
    white-space: nowrap;
  }

  @media (max-width: 1400px) {
    .weight-calc-page .dimension-control {
      --wc-dim-input-w: 4.15rem;
      --wc-dim-gap: 0;
      --wc-dim-pad-y: 0.08rem;
      --wc-dim-pad-x: 0.1rem;
      --wc-dim-radius: 0.45rem;
      --wc-dim-symbol: 1.15rem;
      --wc-dim-symbol-fs: 0.65rem;
      --wc-dim-symbol-radius: 0.28rem;
      --wc-dim-input-fs: 0.9rem;
      --wc-dim-unit-fs: 0.58rem;
    }
  }

  @media (max-width: 991.98px) {
    .weight-calc-page .dimension-control {
      --wc-dim-input-w: 3.75rem;
      --wc-dim-gap: 0;
      --wc-dim-pad-y: 0.06rem;
      --wc-dim-pad-x: 0.1rem;
      --wc-dim-radius: 0.4rem;
      --wc-dim-symbol: 1.05rem;
      --wc-dim-symbol-fs: 0.6rem;
      --wc-dim-symbol-radius: 0.25rem;
      --wc-dim-input-fs: 0.8rem;
      --wc-dim-unit-fs: 0.55rem;
    }
  }

  @media (max-width: 767.98px) {
    .weight-calc-page .dimension-control {
      --wc-dim-input-w: 3.55rem;
      --wc-dim-gap: 0;
      --wc-dim-pad-x: 0.1rem;
      --wc-dim-radius: 0.38rem;
      --wc-dim-symbol: 1rem;
      --wc-dim-symbol-fs: 0.55rem;
      --wc-dim-input-fs: 0.75rem;
      --wc-dim-unit-fs: 0.5rem;
    }
  }

  @media (max-width: 575.98px) {
    .weight-calc-page .dimension-control {
      --wc-dim-input-w: 3.35rem;
      --wc-dim-gap: 0;
      --wc-dim-pad-y: 0.05rem;
      --wc-dim-pad-x: 0.1rem;
      --wc-dim-radius: 0.35rem;
      --wc-dim-symbol: 0.95rem;
      --wc-dim-symbol-fs: 0.55rem;
      --wc-dim-symbol-radius: 0.22rem;
      --wc-dim-input-fs: 0.7rem;
      --wc-dim-unit-fs: 0.48rem;
    }
  }

  .weight-calc-page .weight-calculation-footer {
    display: grid;
    grid-template-columns: minmax(9rem, 0.8fr) minmax(0, 2fr);
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
  }

  .weight-calc-page .weight-calculation-action {
    display: flex;
  }

  .weight-calc-page .weight-calculate-button {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.65rem;
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    box-shadow: 0 3px 10px rgba(var(--wc-accent-rgb), 0.18);
  }

  .weight-calc-page .weight-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    padding: 0.9rem 0;
    border: 1px solid var(--wc-line);
    border-radius: 0.65rem;
    background: rgba(var(--wc-accent-rgb), 0.04);
  }

  .weight-calc-page .weight-result {
    min-width: 0;
    padding: 0 0.75rem;
    text-align: center;
  }

  .weight-calc-page .weight-result + .weight-result {
    border-left: 1px solid var(--wc-line);
  }

  .weight-calc-page .weight-result-label {
    margin-bottom: 0.4rem;
    color: var(--wc-muted);
    font-size: 0.8rem;
    font-weight: 700;
  }

  .weight-calc-page .weight-result-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .weight-calc-page .result-value {
    min-width: 0;
    color: var(--wc-accent-dark);
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .weight-calc-page .weight-calculation-message {
    grid-column: 1 / -1;
    color: var(--wc-secondary);
    font-size: 0.875rem;
    text-align: center;
  }

  .weight-calc-page .weight-calculation-message.is-error {
    color: var(--wc-danger);
  }

  @media (max-width: 575.98px) {
    .weight-calc-page .weight-calculation-footer {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 1rem;
      padding: 1rem;
    }
  }

  .weight-calc-page .modal-shape-btn {
    min-height: 6.5rem;
  }

  .weight-calc-page.weight-modal {
    --wc-modal-margin: 0.5rem;
    --wc-modal-width: 500px;
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    opacity: 0;
    transition: opacity 0.15s linear;
  }

  .weight-calc-page.weight-modal.is-open {
    opacity: 1;
  }

  .weight-calc-page .weight-modal-dialog {
    position: relative;
    width: auto;
    height: calc(100% - var(--wc-modal-margin) * 2);
    margin: var(--wc-modal-margin);
    pointer-events: none;
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
  }

  .weight-calc-page.is-open .weight-modal-dialog {
    transform: none;
  }

  .weight-calc-page .weight-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
    pointer-events: auto;
    background: #fff;
    background-clip: padding-box;
    border: 1px solid var(--wc-card-border);
    border-radius: 0.5rem;
    outline: 0;
  }

  .weight-calc-page .weight-modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--wc-border);
  }

  .weight-calc-page .weight-modal-title {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
  }

  .weight-calc-page .weight-modal-close {
    position: relative;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    padding: 0.5rem;
    color: #000;
    background: transparent;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
  }

  .weight-calc-page .weight-modal-close::before,
  .weight-calc-page .weight-modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .weight-calc-page .weight-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .weight-calc-page .weight-modal-close:hover {
    opacity: 0.75;
  }

  .weight-calc-page .weight-modal-close:focus-visible {
    opacity: 1;
  }

  .weight-calc-page .weight-modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
  }

  .weight-calc-page .weight-modal-body::-webkit-scrollbar {
    display: none;
  }

  .weight-calc-page .weight-modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid var(--wc-border);
  }

  .weight-calc-page .weight-modal-footer > * {
    margin: 0.25rem;
  }

  .weight-calc-page.weight-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background: #000;
    opacity: 0;
    transition: opacity 0.15s linear;
  }

  .weight-calc-page.weight-modal-backdrop.is-open {
    opacity: 0.5;
  }

  @media (min-width: 576px) {
    .weight-calc-page.weight-modal {
      --wc-modal-margin: 1.75rem;
    }

    .weight-calc-page .weight-modal-dialog {
      max-width: var(--wc-modal-width);
      margin-right: auto;
      margin-left: auto;
    }
  }

  @media (min-width: 992px) {
    .weight-calc-page.weight-modal {
      --wc-modal-width: 800px;
    }
  }

  @media (min-width: 1200px) {
    .weight-calc-page.weight-modal {
      --wc-modal-width: 1140px;
    }
  }

  @media (max-width: 991.98px) {
    .weight-calc-page #shape_catalog_sidebar {
      display: none;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .weight-calc-page.weight-modal,
    .weight-calc-page.weight-modal-backdrop,
    .weight-calc-page .weight-modal-dialog,
    .weight-calc-page .weight-button,
    .weight-calc-page .weight-input,
    .weight-calc-page .weight-select {
      transition: none;
    }
  }
