

.body {
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.4;
}

.calc {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 12px;
}

.calc-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 12px;
    align-items: start;
}

.params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.param-block {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.param-block.full-width {
    grid-column: 1 / -1;
}

.param-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.shapes {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.shape-btn {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: #fafafa;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.shape-btn:hover { border-color: #a5b4fc; }

.shape-btn.active {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
}

.shape-btn svg {
    display: block;
    margin: 0 auto 3px;
    width: 40px;
    height: 24px;
}

.dims {
    display: flex;
    gap: 8px;
}

.dim {
    flex: 1;
    display: none;
}

.dim.on { display: block; }

.dim label {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 3px;
    font-weight: 600;
}

.dim-wrap {
    position: relative;
}

.dim-wrap input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    background: #fafafa;
    transition: border-color 0.15s;
}

.dim-wrap input:focus {
    border-color: #4f46e5;
    background: #fff;
}

.dim-wrap .u {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p-item { position: relative; }

.p-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.p-item label {
    display: inline-block;
    padding: 6px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    background: #fafafa;
    white-space: nowrap;
}

.p-item label:hover {
    border-color: #a5b4fc;
    color: #4f46e5;
}

.p-item input:checked + label {
    border-color: #4f46e5;
    background: #4f46e5;
    color: #fff;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chk {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.15s;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    user-select: none;
}

.chk:hover { border-color: #a5b4fc; }

.chk.on {
    border-color: #4f46e5;
    background: #eef2ff;
}

.chk input { display: none; }

.chk-box {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.chk.on .chk-box {
    background: #4f46e5;
    border-color: #4f46e5;
}

.chk-box svg {
    width: 10px;
    height: 10px;
    opacity: 0;
}

.chk.on .chk-box svg { opacity: 1; }

.result {
    position: sticky;
    top: 16px;
}

.result-card {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 6px 24px rgba(79,70,229,0.3);
    margin-bottom: 10px;
}

.res-label {
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.model-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.13);
    border-radius: 8px;
    font-size: 12px;
    min-height: 36px;
    flex-wrap: wrap;
}

.model-info-bar .model-name {
    font-weight: 700;
    font-size: 13px;
}

.model-info-bar .model-ppm {
    opacity: 0.85;
    white-space: nowrap;
}

.model-info-bar .model-error {
    color: #fca5a5;
    font-size: 11px;
}

.res-price {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 2px;
    transition: transform 0.2s;
}

.res-price.pop { transform: scale(1.05); }

.res-info {
    font-size: 11px;
    opacity: 0.65;
    margin-bottom: 14px;
}

.bdown {
    background: rgba(255,255,255,0.13);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: left;
}

.brow {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
    opacity: 0.85;
}

.brow.tot {
    border-top: 1px solid rgba(255,255,255,0.25);
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 14px;
    opacity: 1;
}

.cta-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cta-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.cta-sub {
      font-size: 12px;
    color: #020202;
    text-align: center;
    margin-bottom: 14px;
}

.msg-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.msg-opt { position: relative; }

.msg-opt input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.msg-opt label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    transition: all 0.15s;
}

.msg-opt label:hover { border-color: #a5b4fc; }

.msg-opt input:checked + label {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
}

.msg-opt label svg { width: 16px; height: 16px; }

.ph-row {
    display: flex;
    gap: 8px;
}

.ph-row input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.ph-row input:focus { border-color: #4f46e5; }

.ph-row button {
   /* padding: 10px 18px;*/
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.ph-row button:hover { background: #4338ca; }

.priv {
    font-size: 10px;
    color: #9ca3af;
    text-align: center;
    margin-top: 8px;
}

.priv a { color: #4f46e5; text-decoration: none; }

@media (max-width: 900px) {
    .calc-grid { grid-template-columns: 1fr; }
    .params    { grid-template-columns: 1fr; }
    .result    { position: static; }
}