:root {
    --primary-blue: #f8fafc;
    --light-blue: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --bg-main: transparent;
    --white: rgba(30, 41, 59, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 30px rgba(56,189,248,0.3);
    --transition-speed: 0.3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--tool-surface);
    color: var(--text-main);
    line-height: 1.5; min-height: 100vh; background-attachment: fixed;
}
body::before {
    content: ''; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vw; height: 80vh; background: var(--tool-surface);
    z-index: -1; pointer-events: none; filter: blur(100px); animation: pulse-glow 8s infinite alternate;
}
@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

/* ── TOP BAR ───────────────────────────────── */
#topbar {
    position: sticky;
    top: 0;
    height: 72px;
    background: var(--tool-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--tool-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1.5rem;
    z-index: 200;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.cart-toggle-btn {
    position: static;
    z-index: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--tool-line);
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--tool-inset);
    color: var(--text-main);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
}
.cart-toggle-btn:hover,
.cart-toggle-btn:focus-visible {
    border-color: var(--tool-border-strong);
    background: var(--tool-hover);
    outline: none;
}
.cart-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--tool-inset);
    color: var(--tool-accent);
    font-size: 12px;
    font-weight: 800;
}
.version-badge {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--tool-muted);
    background: var(--tool-inset);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--tool-line);
    font-style: italic;
}
.logo-link {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.logo-link:hover {
    transform: scale(1.05);
}
.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}
.app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    padding-left: 1.5rem;
    border-left: 1px solid var(--tool-line);
    white-space: nowrap;
    color: var(--tool-ink);
}

.main-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; position: relative; z-index: 10; }

.filter-section {
    background: var(--tool-inset); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px 32px; box-shadow: var(--shadow-soft); margin-bottom: 30px;
}
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; }
.filter-title-wrap { display: flex; align-items: center; gap: 8px; }
.filter-title-wrap h2 { font-size: 18px; font-weight: 600; color: var(--tool-ink); }
.info-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--tool-line); font-size: 12px; color: var(--tool-ink); }
.info-icon:hover { color: var(--tool-ink); border-color: var(--tool-border-strong); background: var(--tool-hover); }
.reset-btn { background: none; border: none; color: var(--primary-blue); font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.3s; }
.reset-btn:hover { color: var(--tool-accent); }

.filter-grid { display: flex; flex-direction: column; gap: 16px; }
.filter-row { display: flex; align-items: flex-start; }
.filter-label { width: 180px; font-size: 14px; color: var(--text-main); font-weight: 500; padding-top: 6px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.filter-option { background: var(--tool-inset); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.filter-option:hover { color: var(--primary-blue); border-color: var(--tool-border-strong); background: var(--tool-hover); }
.filter-option.active { color: var(--tool-muted); background-color: var(--primary-blue); font-weight: 600; border-color: var(--primary-blue); box-shadow: var(--tool-shadow); }
.filter-footer { display: flex; justify-content: center; margin-top: 24px; }
.more-filters-btn { background: var(--tool-inset); border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 20px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.more-filters-btn:hover { background: var(--tool-hover); color: var(--text-main); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.product-card {
    background: var(--tool-inset); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.product-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: var(--tool-surface); transform: skewX(-20deg); transition: left 0.7s; }
.product-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--tool-border-strong); box-shadow: var(--tool-shadow); }
.product-card:hover::before { left: 200%; }
.product-image { width: 200px; height: 150px; object-fit: contain; margin-bottom: 20px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)); }
.product-name { font-size: 16px; font-weight: 700; color: var(--primary-blue); margin-bottom: 16px; text-align: center; }
.product-specs { width: 100%; font-size: 13px; color: var(--text-muted); }
.spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--tool-line); }
.spec-row:last-child { border-bottom: none; }
.spec-value { font-weight: 500; color: var(--text-main); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(37, 46, 39, .4); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: var(--tool-surface); backdrop-filter: blur(20px); border: 1px solid var(--tool-line); border-radius: 1.5rem; width: 1100px; max-width: 95%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--tool-shadow); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: var(--text-main); font-weight: 600; margin: 0; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.close-btn:hover { color: var(--tool-danger); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); text-align: right; }
.primary-btn { background: var(--tool-surface); color: var(--tool-ink); border: none; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; box-shadow: var(--tool-shadow); transition: all 0.3s; }
.primary-btn:hover { transform: translateY(-2px); box-shadow: var(--tool-shadow); }
.cable-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--tool-line); border-radius: 8px; margin-bottom: 10px; cursor: pointer; background: var(--tool-inset); transition: all 0.3s; }
.cable-option:hover { border-color: var(--tool-border-strong); background: var(--tool-hover); }
.cable-option:has(input:checked) {
    border-color: var(--tool-border-strong);
    background: var(--tool-selected);
    box-shadow: var(--tool-shadow);
    transform: scale(1.01);
}
.cable-option:has(input:checked) span {
    color: var(--tool-ink);
    font-weight: 600;
}
.cable-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.42;
    background: var(--tool-inset);
}
.cable-option:has(input:disabled):hover {
    border-color: var(--tool-border-strong);
    background: var(--tool-hover);
}
.code-badge {
    background: var(--tool-inset);
    color: var(--tool-danger) !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 5px;
    border: 1px solid var(--tool-line);
    font-size: 11px;
    vertical-align: middle;
}
.cable-option input { accent-color: #38bdf8; }
.configuration-sections {
    list-style: decimal outside;
    margin: 0;
    padding-inline-start: 1.5rem;
}
.configuration-sections > li + li {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--tool-line);
}
.configuration-sections > li::marker { color: var(--tool-accent); font-size: 18px; font-weight: 700; }
.configuration-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 8px;
}
.configuration-heading h3 { margin: 0; font-size: 18px; line-height: 1.4; color: var(--text-main); }
.configuration-codes { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.configuration-codes:empty { display: none; }
.configuration-codes .code-badge { margin: 0; }
.configuration-field + .configuration-field { margin-top: 12px; }
#modal-body .configuration-sections .configuration-field h4 { margin: 0 0 5px; font-size: 15px; }
.configuration-options { display: flex; flex-wrap: wrap; gap: 10px; }
.configuration-stack { display: flex; flex-direction: column; gap: 8px; }
.configuration-note, .configuration-hint { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.configuration-note { margin: 0 0 8px; }
div.configuration-hint { margin-bottom: 5px; }
small.configuration-hint { display: block; margin-top: 4px; }
.option-photo-row { display: flex; align-items: flex-start; gap: 5px; }
.option-photo-row:has(> .cable-option) { align-items: center; }
.option-photo-row > label { flex: 1; min-width: 0; }
.option-photo-trigger {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    margin-inline-start: 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tool-accent);
    vertical-align: middle;
    cursor: pointer;
}
.option-photo-row > .option-photo-trigger,
.configuration-heading > .option-photo-trigger,
.hardware-dialog-heading > .option-photo-trigger { margin: 0; }
.option-photo-trigger::before {
    content: 'i';
    display: grid;
    place-items: center;
    width: 12px;
    height: 12px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font: 700 10px/1 system-ui, sans-serif;
}
.option-photo-trigger:is(:hover, [aria-expanded="true"]) { background: var(--tool-hover); }
.option-photo-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.option-photo-preview {
    --option-photo-image-height: min(348px, 48vh, var(--option-photo-image-height-limit, 348px));
    --option-photo-inline-size: min(592px, calc(100vw - 40px), calc(var(--option-photo-ratio, 1) * var(--option-photo-image-height)));
    position: fixed;
    inset: auto;
    z-index: 1100;
    max-width: min(616px, calc(100vw - 16px));
    max-height: var(--option-photo-height-limit, calc(100vh - 16px));
    overflow: auto;
    margin: 0;
    padding: 9px;
    border: 1px solid var(--tool-line);
    border-radius: 8px;
    background: var(--tool-surface);
    color: var(--text-main);
    box-shadow: 0 4px 14px rgb(20 40 58 / 18%);
}
.option-photo-preview img {
    display: block;
    width: var(--option-photo-inline-size);
    height: auto;
    margin-inline: auto;
}
.option-photo-preview p {
    max-width: max(var(--option-photo-inline-size), min(280px, calc(100vw - 40px)));
    margin: 7px 0 0;
    font-size: 14px;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.configuration-sections .option-item-code { display: none; }
.configuration-sections input:checked + div .option-item-code { display: inline; }
.robot-quantity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}
.accessory-quantity-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}
.accessory-quantity-wrap.is-hidden { display: none; }
.accessory-quantity {
    width: 58px;
    padding: 4px 6px;
    border: 1px solid var(--tool-line);
    border-radius: 5px;
    background: var(--tool-inset);
    color: var(--text-main);
    font-size: 12px;
    text-align: right;
}
.accessory-quantity:focus-visible {
    outline: 2px solid var(--tool-line);
    outline-offset: 1px;
}
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    background: rgba(37, 46, 39, .4);
    backdrop-filter: blur(6px);
}
.cart-panel {
    width: min(560px, 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--tool-surface);
    border-left: 1px solid var(--tool-line);
    box-shadow: var(--tool-shadow);
}
.cart-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
}
.cart-panel-header h2 { color: var(--tool-ink); font-size: 20px; }
.cart-summary-text { margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}
.cart-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--tool-line);
    border-radius: 12px;
}
.cart-item {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--tool-line);
    border-radius: 12px;
    background: var(--tool-inset);
}
.cart-item:last-child { margin-bottom: 0; }
.cart-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.cart-item-title { color: var(--tool-ink); font-size: 15px; font-weight: 700; }
.cart-item-meta { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.cart-item-actions { display: flex; gap: 6px; }
.cart-item-action {
    border: 1px solid var(--tool-line);
    border-radius: 6px;
    padding: 5px 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
}
.cart-item-action:hover,
.cart-item-action:focus-visible { color: var(--tool-ink); border-color: var(--tool-border-strong); outline: none; }
.cart-item-details {
    display: grid;
    grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.6fr) auto;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--tool-line);
    color: var(--text-muted);
    font-size: 12px;
}
.cart-item-detail-name { color: var(--text-main); }
.cart-item-detail-code { color: var(--tool-warning); }
.cart-item-detail-qty { color: var(--tool-ink); font-weight: 700; text-align: right; white-space: nowrap; }
.cart-panel-footer {
    padding: 18px 24px 24px;
    border-top: 1px solid var(--border-color);
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.cart-total-row strong { color: var(--tool-ink); }
.cart-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.secondary-btn {
    border: 1px solid var(--tool-line);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--tool-inset);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
}
.secondary-btn:hover:not(:disabled),
.secondary-btn:focus-visible { color: var(--tool-ink); border-color: var(--tool-border-strong); outline: none; }
.primary-btn:disabled,
.secondary-btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
@media (max-width: 768px) { .filter-row { flex-direction: column; } .filter-label { width: 100%; margin-bottom: 8px; } }
@media (max-width: 640px) {
    #topbar { padding: 0 1rem; }
    .app-title { display: none; }
    .cart-toggle-btn { padding: 6px 8px; gap: 5px; font-size: 12px; }
    .modal-body { flex-direction: column !important; gap: 20px !important; }
    .cart-item-details { grid-template-columns: 1fr auto; }
    .cart-item-detail-code { grid-column: 1 / -1; }
    .cart-actions { flex-direction: column-reverse; }
    .cart-actions button { width: 100%; }
}

/* The embedded guide renders this same page; only its tutorial pointer and focus ring are added. */
html[data-model-select-embed="manual"] {
    scroll-behavior: auto;
}

html[data-model-select-embed="manual"] #inorobot-language-switcher {
    display: none !important;
}

html[data-model-select-embed="manual"] .logo-link {
    pointer-events: none;
}

html[data-model-select-embed="manual"],
html[data-model-select-embed="manual"] body,
html[data-model-select-embed="manual"] .modal-body {
    overflow-anchor: none;
}

html[data-model-select-embed="manual"] .model-manual-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2200;
    width: 25px;
    height: 31px;
    color: var(--tool-ink);
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.8));
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-60px, -60px, 0);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

html[data-model-select-embed="manual"] .model-manual-cursor svg {
    display: block;
    width: 100%;
    height: 100%;
}

html[data-model-select-embed="manual"] .model-manual-cursor.is-visible {
    opacity: 1;
}

html[data-model-select-embed="manual"] .model-manual-spotlight {
    position: fixed;
    z-index: 2190;
    border: 2px solid var(--tool-line);
    box-shadow: 0 0 0 2px var(--tool-selected);
    opacity: 0;
    pointer-events: none;
    transition: left 0.42s cubic-bezier(0.16, 1, 0.3, 1), top 0.42s cubic-bezier(0.16, 1, 0.3, 1), width 0.42s cubic-bezier(0.16, 1, 0.3, 1), height 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-visible {
    opacity: 1;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-scroll-tracking {
    opacity: 0 !important;
    transition: none !important;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-pulsing {
    animation: modelManualSpotlightOnce 0.55s ease-out 1;
}

html[data-model-select-embed="manual"] .model-manual-ripple {
    position: fixed;
    z-index: 2210;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid var(--tool-line);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
}

html[data-model-select-embed="manual"] .model-manual-ripple.is-visible {
    animation: modelManualClickRipple 0.45s ease-out 1;
}

html[data-model-select-embed="manual"] .model-manual-hover {
    filter: brightness(1.08);
}

html[data-model-select-embed="manual"] .model-manual-pressed {
    transform: scale(0.97) !important;
    transition: transform 0.12s ease !important;
}

html[data-model-select-embed="manual"] .modal-content.model-manual-enter {
    animation: modelManualModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-download-toast {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 2250;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 310px;
    padding: 13px 16px;
    border: 1px solid var(--tool-line);
    border-radius: 12px;
    background: var(--tool-surface);
    color: var(--tool-ink);
    box-shadow: var(--tool-shadow);
    animation: modelManualToastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-toast-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--tool-inset);
    color: var(--tool-accent);
    font-weight: 800;
}

html[data-model-select-embed="manual"] .model-manual-download-toast strong,
html[data-model-select-embed="manual"] .model-manual-download-toast small {
    display: block;
}

html[data-model-select-embed="manual"] .model-manual-download-toast strong {
    font-size: 13px;
}

html[data-model-select-embed="manual"] .model-manual-download-toast small {
    margin-top: 3px;
    color: var(--tool-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer {
    position: fixed;
    inset: 18px;
    z-index: 2180;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--tool-line);
    border-radius: 16px;
    background: var(--tool-inset);
    box-shadow: var(--tool-shadow);
    animation: modelManualViewerIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer > header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--tool-line);
    background: var(--tool-surface);
    color: var(--tool-ink);
}

html[data-model-select-embed="manual"] .model-manual-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 30px;
    border-radius: 7px;
    background: var(--tool-inset);
    color: var(--tool-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

html[data-model-select-embed="manual"] .model-manual-spreadsheet-icon {
    background: var(--tool-inset);
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header strong,
html[data-model-select-embed="manual"] .model-manual-document-viewer header small {
    display: block;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header strong {
    font-size: 14px;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--tool-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: var(--tool-inset);
    color: var(--tool-muted);
    font-size: 22px;
}

html[data-model-select-embed="manual"] .model-manual-document-scroll {
    flex: 1;
    overflow: auto;
    padding: 26px;
    scroll-behavior: auto;
}

html[data-model-select-embed="manual"] .model-manual-configuration-sheet {
    box-sizing: border-box;
    width: clamp(760px, 100%, 1240px);
    min-height: 440px;
    margin: 0 auto;
    padding: 26px;
    background: #fff;
    color: #243746;
    font: 13px/1.45 "Malgun Gothic", Arial, sans-serif;
    box-shadow: var(--tool-shadow);
}

.model-manual-configuration-sheet table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.model-manual-configuration-sheet :is(th, td) {
    padding: 7px 8px;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.model-manual-configuration-sheet thead {
    background: #075e94;
    color: #fff;
}

.model-manual-configuration-sheet .sheet-summary {
    height: 45px;
    border-bottom: 5px solid #fff;
    background: #192f42;
}

.model-manual-configuration-sheet .sheet-summary th { font-size: 17px; }
.model-manual-configuration-sheet .sheet-summary td { text-align: right; color: #dae8f0; }
.model-manual-configuration-sheet .sheet-summary td:nth-child(odd) {
    color: #fff;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
}

.model-manual-configuration-sheet tbody tr { border-bottom: 1px solid #d9e4eb; }
.model-manual-configuration-sheet .sheet-option:nth-child(even) { background: #f5f8fa; }
.model-manual-configuration-sheet .sheet-cable { background: #eff6fa; }
.model-manual-configuration-sheet .sheet-robot {
    border-top: 1px solid #8db7ce;
    background: #dceffc;
    color: #114c70;
    font-weight: 700;
}
.model-manual-configuration-sheet .sheet-number,
.model-manual-configuration-sheet thead tr:last-child :is(:nth-child(1), :nth-child(6)) { text-align: center; }
.model-manual-configuration-sheet tbody td { white-space: pre-line; }
.model-manual-configuration-sheet .sheet-quantity { text-align: right; font-weight: 700; }

html.model-manual-paused .model-manual-cursor {
    transition-duration: 0s !important;
}

html.model-manual-paused .model-manual-spotlight {
    transition-duration: 0s !important;
}

@keyframes modelManualSpotlightOnce {
    0% { box-shadow: 0 0 0 2px var(--tool-selected); }
    100% { box-shadow: 0 0 0 2px var(--tool-selected); }
}

@keyframes modelManualClickRipple {
    0% { opacity: 0.95; transform: scale(0.45); }
    100% { opacity: 0; transform: scale(4.2); }
}

@keyframes modelManualModalEnter {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modelManualToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modelManualViewerIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    html[data-model-select-embed="manual"] .model-manual-cursor,
    html[data-model-select-embed="manual"] .model-manual-spotlight,
    html[data-model-select-embed="manual"] .model-manual-ripple,
    html[data-model-select-embed="manual"] .model-manual-download-toast,
    html[data-model-select-embed="manual"] .model-manual-document-viewer,
    html[data-model-select-embed="manual"] .model-manual-enter {
        animation: none !important;
        transition: none !important;
    }
}

/* Model cards remain native links even when the configurator handles an ordinary click. */
.product-card{text-decoration:none;color:inherit}
.product-card a { color: inherit; text-decoration: none; }

.hardware-grid { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
.product-card.hardware-category-card {
    display: grid;
    gap: 0;
    padding: 0;
    text-align: start;
    color: var(--text-main);
    background: var(--tool-surface);
    font: inherit;
}
.hardware-category-card::before { display: none; }
.hardware-photo {
    display: grid;
    place-items: center;
    width: 100%;
    height: 160px;
    padding: 16px 24px;
    box-sizing: border-box;
    background: #fff;
}
.hardware-photo img { max-width: 88%; max-height: 122px; object-fit: contain; }
.hardware-card-caption {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--tool-line);
}
.hardware-card-caption strong { font-size: 17px; line-height: 1.4; }
.hardware-card-caption > span { color: var(--text-muted); font-size: 13px; }
.hardware-dialog {
    position: fixed;
    inset: 0;
    width: min(820px, calc(100% - 32px));
    max-height: 85dvh;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tool-line);
    border-radius: 16px;
    background: var(--tool-surface);
    color: var(--text-main);
    box-shadow: var(--tool-shadow);
}
.hardware-dialog::backdrop { background: rgb(20 40 58 / 45%); }
.hardware-dialog-content { display: flex; flex-direction: column; max-height: inherit; }
.hardware-dialog-heading { display: flex; align-items: center; gap: 6px; }
.hardware-dialog h2 { margin: 0; font: inherit; font-size: 20px; font-weight: 700; }
.hardware-dialog .close-btn { min-width: 36px; min-height: 36px; }
#hardware-order-form { display: flex; flex-direction: column; min-height: 0; }
.hardware-dialog-footer {
    flex: none;
    display: flex;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid var(--tool-line);
}
.hardware-dialog-footer button:disabled { opacity: .5; cursor: default; }
.hardware-choice { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.hardware-choice input { flex: none; margin: 0; accent-color: var(--tool-accent); }
.hardware-parts tr:has(.hardware-choice) { cursor: pointer; }
.hardware-parts tr:has(.hardware-choice input:checked) { background: var(--tool-hover); }
.hardware-quantity {
    box-sizing: border-box;
    width: 64px;
    min-height: 30px;
    padding: 3px 6px;
    border: 1px solid var(--tool-border-strong);
    border-radius: 6px;
    background: var(--tool-surface);
    color: var(--tool-ink);
    font: inherit;
}
.hardware-quantity:disabled { opacity: .45; pointer-events: none; }
.hardware-parts .hardware-section-heading,
.configuration-stack .expansion-group-title {
    color: var(--tool-accent);
    font-size: 13px;
    font-weight: 700;
}
.hardware-parts .hardware-section-heading { padding: 7px 18px; background: var(--tool-inset); }
.configuration-stack .expansion-group-title { margin: 0 0 2px; }
.expansion-card-choice { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.expansion-card-choice > input { margin-top: 3px; }
.expansion-card-description { flex: 1; min-width: 0; }
.configuration-stack.expansion-group + .expansion-group { margin-top: 6px; }
.cart-hardware-details { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.cart-hardware-details label { display: flex; align-items: center; gap: 6px; color: var(--tool-ink); }
.hardware-parts { overflow: auto; overscroll-behavior: contain; }
.hardware-parts table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: start; }
.hardware-parts :is(th, td) { padding: 12px 18px; border-bottom: 1px solid var(--tool-line); text-align: start; }
.hardware-parts thead th { position: sticky; top: 0; background: var(--tool-inset); color: var(--text-muted); }
.hardware-parts tbody th { max-width: 380px; overflow-wrap: anywhere; }
.hardware-parts small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 13px; font-weight: 400; }
.hardware-parts code { color: var(--tool-accent); white-space: nowrap; }
@media (max-width: 600px) {
    .hardware-parts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .hardware-parts :is(table, tbody, tr, td, th) { display: block; }
    .hardware-parts tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--tool-line); }
    .hardware-parts tbody :is(th, td) { max-width: none; padding: 2px 0; border: 0; }
    .hardware-parts tr:has(.hardware-section-heading) { padding: 0; }
    .hardware-parts .hardware-section-heading { padding: 7px 16px; }
    .hardware-parts td::before { content: attr(data-label); margin-inline-end: 8px; font-size: 12px; color: var(--text-muted); }
}
.product-main-link::after { content: ''; position: absolute; inset: 0; }
.scara-comparison { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scara-comparison th, .scara-comparison td { padding: 5px 2px; border-bottom: 1px solid var(--tool-line); text-align: center; }
.scara-comparison th:first-child { width: 44%; padding-left: 0; text-align: left; overflow-wrap: anywhere; }
.scara-comparison thead th { font-weight: 600; overflow-wrap: anywhere; }
.scara-comparison tbody th { font-weight: 400; }
.scara-comparison td { color: var(--text-main); font-weight: 500; white-space: nowrap; }
.scara-comparison tbody tr:last-child > * { border-bottom: 0; }
.scara-comparison a { position: relative; display: block; }
.scara-comparison thead a { color: var(--primary-blue); }
.scara-comparison a:hover, .scara-comparison a:focus-visible { text-decoration: underline; }
.model-static-resources a[aria-current="page"] { font-weight: 700; }
body[data-design-page="model"] .modal-header h1{font-size:22px;line-height:1.4;word-break:keep-all;overflow-wrap:anywhere;margin:0;color:var(--text-main);font-weight:600}
.model-static-detail{width:100%;min-width:0;display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:32px}
.model-static-detail img{width:100%;max-height:350px;object-fit:contain}
.model-static-detail h2{font-size:28px;line-height:1.4;margin:0 0 16px;overflow-wrap:anywhere}
.model-static-specs{margin:0 0 24px}.model-static-specs div{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:9px 0;border-bottom:1px solid var(--border-color)}
.model-static-specs dt{color:var(--text-muted)}.model-static-specs dd{margin:0;text-align:right;overflow-wrap:anywhere}
.model-static-resources{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}.model-static-resources a,.model-static-back{color:var(--tool-accent);text-underline-offset:4px}
@media(max-width:720px){.model-static-detail{grid-template-columns:minmax(0,1fr);gap:24px}.model-static-detail img{max-height:220px}}

@media(max-width:720px){
 body[data-design-page="model"] .modal-footer{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;padding:12px 16px}
 body[data-design-page="model"] .modal-footer button{width:100%;min-width:0;min-height:44px!important;padding:10px 8px!important;font-size:14px!important;line-height:1.4;word-break:keep-all}
 body[data-design-page="model"] .modal-header .close-btn{flex-shrink:0;min-width:32px;min-height:32px}
}

/* Use the same compact control for robot and option quantities. */
body[data-design-page="model"] #options-modal :is(.robot-quantity,.accessory-quantity-wrap){height:24px;font-size:14px;line-height:24px}
body[data-design-page="model"] #options-modal :is(.robot-quantity,.accessory-quantity-wrap) input.accessory-quantity{height:24px;min-height:24px;max-height:24px;padding:0 4px;font-size:16px;line-height:22px;font-weight:600}
