/* Space Calculator v2 — mockup layout */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

body[data-ss-page="sc-calculator2"] {
    /* Brand orange — same as wix-header / Find a Unit (#f7941e) */
    --sc2-orange: #f7941e;
    --sc2-orange-dark: #e5850f;
    --sc2-orange-soft: #fff8f0;
    --sc2-orange-pale: #fef3e6;
    --sc2-orange-glow: rgba(247, 148, 30, 0.16);
    --sc2-navy: #1e293b;
    --sc2-text: #334155;
    --sc2-muted: #64748b;
    --sc2-border: #e2e8f0;
    --sc2-bg: #f8fafc;
    --sc2-white: #fff;
    --sc2-danger: #dc2626;
    --sc2-ok: #16a34a;
    --sc2-radius: 14px;
    --sc2-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --sc2-card-pad: 32px;
    --sc2-grid-gap: 32px;
    --sc2-preview-col: minmax(280px, 360px);
    --sc2-input-height: 46px;
    background: var(--sc2-bg);
    font-family: "DM Sans", "Segoe UI", Sarabun, system-ui, sans-serif;
    color: var(--sc2-text);
    line-height: 1.5;
}

.sc2-page {
    padding: 0 0 0;
}

.sc2-container {
    width: min(1140px, 100% - 40px);
    margin-inline: auto;
}

/* ─── Hero: text | morespace ─── */
.sc2-hero {
    --hero-orange: var(--sc2-orange);
    --hero-orange-pale: var(--sc2-orange-pale);
    --hero-navy: #1a2744;
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #fff 78%, var(--sc2-bg) 100%);
    padding-bottom: 0;
    overflow: hidden;
}

.sc2-hero::after {
    display: none;
}

.sc2-hero__inner {
    position: relative;
    z-index: 2;
    padding: 0 0 24px;
}

.sc2-hero__layout {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    align-items: start;
    gap: clamp(12px, 2vw, 28px);
    position: relative;
}

.sc2-hero__content {
    position: relative;
    z-index: 2;
    max-width: none;
    min-width: 0;
    padding: 28px 0 0;
}

.sc2-hero__brand {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    align-self: start;
    flex-shrink: 0;
    pointer-events: none;
    margin-top: 15px;
    padding-top: 0;
    padding-right: 120px;
}

.sc2-hero__morespace {
    display: block;
    width: 300px;
    height: auto;
    max-width: none;
    object-fit: contain;
    pointer-events: none;
}

.sc2-hero__title {
    margin: 0 0 14px;
    font-family: georgia, palatino, "book antiqua", "palatino linotype", serif;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 400;
    line-height: 1.22;
    letter-spacing: 0;
    color: #000;
}

.sc2-hero__title-l1,
.sc2-hero__title-l2 {
    display: inline;
}

html[lang="en"] body[data-ss-page="sc-calculator2"] .sc2-hero__title {
    text-transform: uppercase;
}

.sc2-hero__sub {
    margin: 0 0 16px;
    font-family: "DM Sans", "Segoe UI", Sarabun, system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #475569;
    max-width: 500px;
}

.sc2-hero__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px 16px;
    width: 100%;
    max-width: 100%;
}

.sc2-hero__features li {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
    cursor: default;
    user-select: none;
}

.sc2-hero__feat-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: var(--hero-orange-pale);
    color: var(--hero-orange);
    font-size: 17px;
}

.sc2-hero__feat-icon .fa-cube {
    font-size: 16px;
}

.sc2-hero__feat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    font-family: "DM Sans", "Segoe UI", Sarabun, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.sc2-hero__feat-line1,
.sc2-hero__feat-line2 {
    display: block;
    font-weight: 400;
}

.sc2-hero__feat-line1 {
    color: #334155;
    white-space: nowrap;
}

.sc2-hero__feat-line2 {
    color: #64748b;
}

/* Calculator card — below hero */
.sc2-hero + .sc2-container {
    position: relative;
    z-index: 3;
    margin-top: 0;
}

.sc2-calculator-card {
    background: var(--sc2-white);
    border: 1px solid var(--sc2-border);
    border-radius: 18px;
    box-shadow: var(--sc2-shadow);
    padding: var(--sc2-card-pad) var(--sc2-card-pad) 28px;
    margin-top: 0;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

/* Top grid: steps 1–2 + preview */
.sc2-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sc2-preview-col);
    gap: var(--sc2-grid-gap);
    align-items: start;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--sc2-border);
}

.sc2-form-col {
    min-width: 0;
}

.sc2-form-col--bottom {
    min-width: 0;
}

.sc2-form-col--top .sc2-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sc2-step {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--sc2-border);
}

.sc2-step:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sc2-step__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--sc2-navy);
}

.sc2-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sc2-orange);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sc2-step__info {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-left: 2px;
}

.sc2-step__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sc2-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sc2-navy);
}

.sc2-select-wrap {
    position: relative;
}

.sc2-select-wrap select {
    width: 100%;
    height: var(--sc2-input-height);
    box-sizing: border-box;
    padding: 0 36px 0 38px;
    border: 1px solid var(--sc2-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.92rem;
    line-height: var(--sc2-input-height);
    color: var(--sc2-navy);
    background: var(--sc2-white);
    appearance: none;
    cursor: pointer;
}

.sc2-select-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sc2-orange);
    font-size: 0.9rem;
    pointer-events: none;
}

.sc2-select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.72rem;
    pointer-events: none;
}

.sc2-select-wrap select:focus,
.sc2-add-form input:focus {
    outline: none;
    border-color: var(--sc2-orange);
    box-shadow: 0 0 0 3px var(--sc2-orange-glow);
}

.sc2-add-form input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--sc2-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.92rem;
    color: var(--sc2-navy);
    background: var(--sc2-white);
}

/* Unit type toggle — height matches branch select */
.sc2-seg {
    display: flex;
    height: var(--sc2-input-height);
    border: 1px solid var(--sc2-border);
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}

.sc2-seg label.opt {
    flex: 1 1 50%;
    min-width: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
}

.sc2-seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sc2-seg span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--sc2-navy);
    background: transparent;
    white-space: nowrap;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.sc2-seg span i {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: inherit;
}

.sc2-seg input:checked + span {
    background: var(--sc2-orange);
    color: #fff;
}

/* Layout cards — 3 across like mockup */
.sc2-layout-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sc2-layout-card {
    position: relative;
    margin: 0;
    cursor: pointer;
    display: flex;
    min-width: 0;
}

.sc2-layout-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sc2-layout-card__body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    width: 100%;
    min-height: 176px;
    box-sizing: border-box;
    padding: 38px 14px 18px;
    border: 1.5px solid var(--sc2-border);
    border-radius: 12px;
    background: var(--sc2-white);
    transition: border-color 0.15s, background 0.15s;
}

.sc2-layout-card__radio {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    flex-shrink: 0;
}

.sc2-layout-card input:checked + .sc2-layout-card__body {
    border-color: var(--sc2-orange);
    background: var(--sc2-orange-soft);
    box-shadow: none;
}

.sc2-layout-card input:checked + .sc2-layout-card__body .sc2-layout-card__radio {
    border-color: var(--sc2-orange);
}

.sc2-layout-card input:checked + .sc2-layout-card__body .sc2-layout-card__radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--sc2-orange);
}

.sc2-layout-card__icon {
    width: 74px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    flex-shrink: 0;
    margin: 4px 0 6px;
}

.sc2-layout-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sc2-layout-card__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

.sc2-layout-card__text strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sc2-navy);
    line-height: 1.35;
}

.sc2-layout-card__text span {
    font-size: 0.78rem;
    color: var(--sc2-muted);
    line-height: 1.4;
}

.sc2-layout-custom {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid var(--sc2-border);
}

.sc2-layout-custom .sc-opt-line {
    margin: 10px 0;
}

.sc2-layout-custom .sc-opt-line > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.sc2-layout-custom .num-in {
    margin: 8px 0 0 1.65rem;
    max-width: 160px;
}

.sc2-layout-custom .num-in input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--sc2-border);
    border-radius: 8px;
}

.sc2-layout-custom .sc-opt-line.disabled {
    opacity: 0.48;
    pointer-events: none;
}

/* Hidden legacy radios */
.sc2-hidden-radios {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Add items form */
.sc2-add-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.sc2-add-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sc2-muted);
}

.sc2-items-head {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sc2-navy);
}

.sc2-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 8px;
}

.sc2-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid var(--sc2-border);
    border-radius: 10px;
}

.sc2-item-row__icon {
    flex-shrink: 0;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc2-item-box-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc2-item-box-3d svg {
    display: block;
}

.sc2-item-row__dims {
    flex: 1;
    min-width: 0;
}

.sc2-item-row__fields input {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--sc2-border);
    border-radius: 8px;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.sc2-item-row--editing {
    align-items: flex-start;
    flex-wrap: wrap;
}

.sc2-item-row--editing .sc2-item-row__dims {
    display: none;
}

.sc2-item-row--editing .sc2-item-row__fields {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    overflow: visible;
    flex: 1 1 180px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.sc2-item-row--editing .sc2-item-edit {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.sc2-item-row__size {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sc2-navy);
}

.sc2-item-row__qty {
    display: block;
    font-size: 0.78rem;
    color: var(--sc2-muted);
    margin-top: 2px;
}

.sc2-item-row__actions {
    display: flex;
    gap: 6px;
}

.sc2-item-edit,
.sc2-item-del {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--sc2-border);
    background: var(--sc2-white);
    cursor: pointer;
    color: var(--sc2-muted);
}

.sc2-item-del {
    color: var(--sc2-danger);
    border-color: #fecaca;
}

/* Preview pane — mockup 3 */
.sc2-preview {
    position: sticky;
    top: 88px;
    padding: 4px 0 0;
    align-self: start;
}

.sc2-preview__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--sc2-navy);
}

.sc2-preview__info {
    color: #94a3b8;
    font-size: 0.88rem;
}

.sc2-preview__canvas-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--sc2-border);
    padding: 12px 8px;
    margin-bottom: 14px;
    overflow: hidden;
}

.sc2-preview canvas#boxCanvas {
    display: block;
    width: 100%;
    height: auto;
    min-height: 200px;
    background: transparent;
}

.sc2-preview__note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f1f5f9;
    border-radius: 10px;
    margin: 0;
}

.sc2-preview__note > i {
    flex-shrink: 0;
    margin-top: 2px;
    color: #64748b;
    font-size: 1rem;
}

.sc2-preview__note p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--sc2-muted);
}

/* Actions + tip row */
.sc2-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin: 24px 0 16px;
}

.sc2-actions__btns {
    display: flex;
    flex: 0 1 auto;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
}

.sc2-actions__btns .sc2-btn {
    flex: 0 0 auto;
}

.sc2-actions .sc2-btn {
    flex: 0 0 auto;
}

.sc2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.sc2-btn--primary {
    background: var(--sc2-orange);
    color: #fff;
}

.sc2-btn--primary:hover {
    background: var(--sc2-orange-dark);
}

.sc2-btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sc2-btn--ghost {
    background: var(--sc2-white);
    color: var(--sc2-navy);
    border: 1px solid var(--sc2-border);
}

.sc2-btn--ghost:hover {
    background: #f9fafb;
}

.sc2-btn--add {
    background: var(--sc2-orange);
    color: #fff;
    padding: 12px 18px;
    white-space: nowrap;
}

.sc2-tip {
    flex: 1 1 240px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 12px 16px;
    background: var(--sc2-orange-soft);
    border-radius: 10px;
}

.sc2-tip i {
    flex-shrink: 0;
    color: var(--sc2-orange);
    font-size: 1.1rem;
    margin-top: 2px;
}

.sc2-tip__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.sc2-tip__text strong {
    font-weight: 700;
    color: var(--sc2-orange);
}

.sc2-tip__text > span {
    color: var(--sc2-muted);
}

.sc2-err {
    color: var(--sc2-danger);
    font-size: 0.88rem;
    margin-top: 10px;
}

/* Results */
.sc2-results {
    margin: 36px 0;
}

.sc2-results__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.sc2-results__icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 16px;
}

.sc2-results__intro {
    flex: 1;
    min-width: 0;
}

.sc2-results__title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sc2-navy);
}

.summary-line {
    font-size: 0.92rem;
    color: var(--sc2-muted);
    margin: 0;
    line-height: 1.5;
}

.summary-hint {
    font-size: 0.84rem;
    color: #607d8b;
    line-height: 1.55;
    margin: 0 0 14px;
}

.tight-warn {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #6d4c00;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sc2-sug-card {
    border: 1px solid var(--sc2-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--sc2-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

.sc2-sug-card .sug-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #e8ecf0;
    padding: 0;
    overflow: hidden;
}

.sc2-sug-card .sug-img-inner {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sc2-sug-card .sug-img img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.sc2-sug-card .avail {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
}

.sc2-sug-card .avail.ok {
    background: #dcfce7;
    color: var(--sc2-ok);
}

.sc2-sug-card .avail.no {
    background: #fee2e2;
    color: var(--sc2-danger);
}

.sc2-sug-card .sug-body {
    padding: 14px 14px 16px;
}

.sc2-sug-size {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sc2-navy);
    margin-bottom: 4px;
}

.sc2-sug-card .sug-dim {
    font-size: 0.82rem;
    color: var(--sc2-muted);
    margin-bottom: 6px;
}

.sc2-sug-card .sug-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sc2-text);
    margin-bottom: 10px;
}

.sc2-sug-card .price-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sc2-orange);
    margin-bottom: 0;
}

.sc2-sug-card .price-main small {
    font-size: 0.55em;
    font-weight: 600;
    color: var(--sc2-muted);
}

.sc2-btn--lead {
    border-color: var(--sc2-orange);
    color: var(--sc2-orange);
}

.sc2-btn--lead:hover {
    background: var(--sc2-orange);
    color: #fff;
    border-color: var(--sc2-orange);
}

.sug-empty {
    text-align: center;
    padding: 28px 22px;
    background: linear-gradient(145deg, var(--sc2-orange-soft) 0%, #fff4e8 100%);
    border: 2px dashed rgba(247, 148, 30, 0.45);
    border-radius: 16px;
    margin-bottom: 16px;
}

.sug-empty p {
    margin: 0;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Contact bar — same width as calculator container */
.sc2-contact-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: #f1f5f9;
    border: 1px solid var(--sc2-border);
    border-radius: 12px;
    margin: 24px 0 0;
    box-sizing: border-box;
}

.sc2-contact-bar__text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--sc2-text);
}

.sc2-contact-bar__text i {
    font-size: 1.4rem;
    color: var(--sc2-orange);
}

.sc2-contact-bar .sc2-btn--lead:hover i {
    color: #fff;
}

/* Lang switch removed — keep hidden utility */
.sc2-lang {
    display: none;
}

/* Modals */
.modal-back {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-back.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    padding: 22px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lead {
    max-width: 520px;
}

.modal .field {
    margin-bottom: 12px;
}

.modal .field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-lead .field:has([required]) > label::after {
    content: ' *';
    color: #dc2626;
    font-weight: 700;
}

.modal input,
.modal select,
.modal textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--sc2-border);
    border-radius: 8px;
    font: inherit;
}

.modal-lead .field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (min-width: 420px) {
    .modal-lead .field-row--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.modal-success {
    text-align: center;
    padding: 28px 24px;
    max-width: 380px;
}

.modal-success .success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 2.25rem;
    line-height: 72px;
    font-weight: 700;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lead-success-auto-hint {
    font-size: 0.86rem;
    color: #607d8b;
    margin: -6px 0 18px;
}

/* Footer */
body[data-ss-page="sc-calculator2"] .ss-footer {
    margin-top: 0;
}

/* Hero: morespace sizing */
@media (max-width: 1120px) {
    .sc2-hero__morespace {
        width: 400px;
    }

    .sc2-hero__brand {
        padding-right: 32px;
    }
}

/* Responsive */
@media (max-width: 960px) {
    .sc2-hero {
        padding-bottom: 0;
        background: linear-gradient(180deg, #fff 0%, #fff 65%, var(--sc2-bg) 100%);
    }

    .sc2-hero__layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        min-height: 0;
    }

    .sc2-hero__brand {
        position: static;
        transform: none;
        order: 2;
        justify-content: center;
        margin-top: 0;
        padding-top: 0;
        padding-right: 0;
    }

    .sc2-hero__content {
        padding-top: 20px;
    }

    .sc2-hero__title {
        max-width: none;
    }

    .sc2-hero__features {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .sc2-hero__morespace {
        width: clamp(220px, 58vw, 300px);
    }

    .sc2-hero__inner {
        padding: 0 0 16px;
    }

    .sc2-hero__sub {
        max-width: none;
        margin-bottom: 18px;
    }

    .sc2-hero__content {
        max-width: none;
    }

    .sc2-hero__feat-line1 {
        white-space: normal;
    }

    .sc2-hero__features {
        gap: 12px 16px;
    }

    .sc2-calculator-card {
        margin-top: 0;
        padding: 24px 20px;
    }

    .sc2-top-grid {
        grid-template-columns: 1fr;
    }

    .sc2-preview {
        position: static;
    }

    .sc2-step__row {
        grid-template-columns: 1fr;
    }

    .sc2-add-form {
        grid-template-columns: 1fr 1fr;
    }

    .sc2-add-form .sc2-btn--add {
        grid-column: 1 / -1;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sc2-actions__btns {
        flex: 1 1 100%;
        width: 100%;
        gap: 10px;
    }

    .sc2-actions__btns .sc2-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.8125rem;
        font-weight: 600;
        gap: 6px;
    }

    .sc2-actions__btns .sc2-btn i {
        font-size: 0.95em;
        flex-shrink: 0;
    }

    .sc2-actions__btns .sc2-btn span {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sc2-tip {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .sc2-hero__morespace {
        width: clamp(180px, 72vw, 240px);
    }

    .sc2-hero__features {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .sc2-hero__features li {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .sc2-hero__feat-icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .sc2-hero__feat-text {
        font-size: 13px;
    }

    .sc2-calculator-card {
        padding: 20px 16px;
    }

    .sc2-add-form {
        grid-template-columns: 1fr;
    }

    .sc2-layout-cards {
        grid-template-columns: 1fr;
    }

    .sc2-layout-card__body {
        min-height: 0;
        padding: 32px 14px 14px;
    }
}
