.page-estimator-wrap *, .page-estimator-wrap *::before, .page-estimator-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }
.page-estimator-wrap {
            --bg: #f0f2f5;
            --card: #ffffff;
            --primary: #4f46e5;
            --primary-light: #6366f1;
            --primary-dark: #4338ca;
            --primary-bg: #eef2ff;
            --text: #1e293b;
            --text-secondary: #64748b;
            --border: #e2e8f0;
            --success: #10b981;
            --warning: #f59e0b;
            --warning-bg: #fffbeb;
            --warning-border: #fde68a;
            --radius: 12px;
            --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            padding: 20px;
            display: block;
            width: 100%;
        }
.page-estimator-wrap .container {
            max-width: 960px;
            margin: 0 auto;
        }

/* WordPress/Elementor can inject empty paragraph tags around shortcode markup; keep them out of the calculator grid. */
.page-estimator-wrap > p,
.page-estimator-wrap .container > p,
.page-estimator-wrap .main-grid > p,
.page-estimator-wrap .main-grid > br {
            display: none !important;
        }
.page-estimator-wrap .pe-header {
            text-align: center;
            padding: 40px 0 32px;
        }
.page-estimator-wrap .pe-header h1 {
            font-size: 1.75rem;
            font-weight: 800;
            color: var(--primary-dark);
            margin-bottom: 8px;
            letter-spacing: -0.02em;
        }
.page-estimator-wrap .pe-header p {
            font-size: 0.95rem;
            color: var(--text-secondary);
            max-width: 500px;
            margin: 0 auto;
            line-height: 1.6;
        }
.page-estimator-wrap .main-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 24px;
        }
@media (max-width: 700px) {
.page-estimator-wrap .main-grid { grid-template-columns: 1fr; }

}
.page-estimator-wrap .card {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 28px;
            border: 1px solid var(--border);
            transition: box-shadow 0.2s;
        }
.page-estimator-wrap .card:hover { box-shadow: var(--shadow-lg); }
.page-estimator-wrap .card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid var(--primary-bg);
        }
.page-estimator-wrap .card-header .icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            flex-shrink: 0;
        }
.page-estimator-wrap .card-source .icon { background: #fef3c7; }
.page-estimator-wrap .card-target .icon { background: #dbeafe; }
.page-estimator-wrap .card-header h2 {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text);
        }
.page-estimator-wrap .card-header span.sub {
            font-size: 0.8rem;
            color: var(--text-secondary);
            font-weight: 400;
        }
.page-estimator-wrap .form-group {
            margin-bottom: 18px;
        }
.page-estimator-wrap .form-group:last-child { margin-bottom: 0; }
.page-estimator-wrap label {
            display: block;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
.page-estimator-wrap select, .page-estimator-wrap input[type="number"] {
            width: 100%;
            padding: 10px 12px;
            border: 1.5px solid var(--border);
            border-radius: 8px;
            font-size: 0.9rem;
            font-family: inherit;
            color: var(--text);
            background: #fafbfc;
            transition: border-color 0.15s, box-shadow 0.15s;
            -moz-appearance: textfield;
        }
.page-estimator-wrap select:focus, .page-estimator-wrap input[type="number"]:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
            background: #fff;
        }
.page-estimator-wrap select {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 36px;
        }
.page-estimator-wrap .margin-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
.page-estimator-wrap .margin-grid .form-group { margin-bottom: 0; }
.page-estimator-wrap .input-suffix { position: relative; }
.page-estimator-wrap .input-suffix input { padding-right: 40px; }
.page-estimator-wrap .input-suffix .suffix {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.75rem;
            color: var(--text-secondary);
            pointer-events: none;
        }
.page-estimator-wrap .custom-size-wrapper {
            display: none;
            gap: 10px;
            margin-top: 8px;
        }
.page-estimator-wrap .custom-size-wrapper.active {
            display: grid;
            grid-template-columns: 1fr 1fr;
        }
.page-estimator-wrap .spacing-helper {
            background: var(--warning-bg);
            border: 1px solid var(--warning-border);
            border-radius: 8px;
            padding: 14px;
            margin-top: 8px;
            margin-bottom: 4px;
        }
.page-estimator-wrap .spacing-helper h4 {
            font-size: 0.78rem;
            font-weight: 700;
            color: #92400e;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
.page-estimator-wrap .spacing-table {
            width: 100%;
            font-size: 0.78rem;
            color: #78350f;
        }
.page-estimator-wrap .spacing-table tr {
            border-bottom: 1px solid rgba(251, 191, 36, 0.3);
        }
.page-estimator-wrap .spacing-table tr:last-child {
            border-bottom: none;
        }
.page-estimator-wrap .spacing-table td {
            padding: 4px 4px;
        }
.page-estimator-wrap .spacing-table td:first-child {
            font-weight: 600;
            white-space: nowrap;
        }
.page-estimator-wrap .spacing-table td:last-child {
            text-align: right;
            color: #92400e;
        }
.page-estimator-wrap .spacing-select-row {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 6px;
        }
.page-estimator-wrap .spacing-select-row select {
            flex: 1;
            font-size: 0.82rem;
            padding: 8px 10px;
            background: white;
        }
.page-estimator-wrap .spacing-select-row .auto-val {
            font-size: 0.78rem;
            color: var(--text-secondary);
            white-space: nowrap;
            font-weight: 500;
            min-width: 70px;
        }
.page-estimator-wrap .spacing-select-row .auto-val strong {
            color: var(--primary);
        }
.page-estimator-wrap .calc-btn {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            color: white;
            border: none;
            padding: 12px 36px;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
            white-space: nowrap;
        }
.page-estimator-wrap .calc-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
        }
.page-estimator-wrap .calc-btn:active { transform: translateY(0); }
.page-estimator-wrap .reset-btn {
            background: transparent;
            border: 1.5px solid var(--border);
            color: var(--text-secondary);
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: border-color 0.15s, color 0.15s;
            margin-left: 8px;
        }
.page-estimator-wrap .reset-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
.page-estimator-wrap .pages-input-section {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 24px 28px;
            border: 1px solid var(--border);
            margin-bottom: 24px;
            display: flex;
            align-items: flex-end;
            gap: 20px;
            flex-wrap: wrap;
        }
.page-estimator-wrap .pages-input-section .form-group {
            flex: 1;
            min-width: 160px;
            margin-bottom: 0;
        }
.page-estimator-wrap .btn-group {
            display: flex;
            align-items: flex-end;
            gap: 8px;
        }
.page-estimator-wrap .result-section {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
            overflow: hidden;
            display: none;
        }
.page-estimator-wrap .result-section.active {
            display: block;
            animation: slideUp 0.4s ease;
        }
@keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }.page-estimator-wrap .result-header {
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            padding: 24px 28px;
            color: white;
        }
.page-estimator-wrap .result-header h3 {
            font-size: 0.85rem;
            font-weight: 600;
            opacity: 0.85;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 4px;
        }
.page-estimator-wrap .result-main {
            font-size: 2.8rem;
            font-weight: 800;
            letter-spacing: -0.03em;
        }
.page-estimator-wrap .result-main .unit {
            font-size: 1.1rem;
            font-weight: 500;
            opacity: 0.8;
            margin-left: 6px;
        }
.page-estimator-wrap .result-body { padding: 28px; }
.page-estimator-wrap .result-detail {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }
@media (max-width: 500px) {
.page-estimator-wrap .result-detail { grid-template-columns: 1fr; }

}
.page-estimator-wrap .detail-item {
            background: #f8fafc;
            border-radius: 8px;
            padding: 14px 16px;
            border: 1px solid var(--border);
        }
.page-estimator-wrap .detail-item .label {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 4px;
        }
.page-estimator-wrap .detail-item .value {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text);
        }
.page-estimator-wrap .detail-item .value.highlight { color: var(--primary); }
.page-estimator-wrap .comparison-bar {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
        }
.page-estimator-wrap .bar-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }
.page-estimator-wrap .bar-track {
            height: 10px;
            background: var(--primary-bg);
            border-radius: 5px;
            overflow: hidden;
            display: flex;
        }
.page-estimator-wrap .bar-source {
            background: #f59e0b;
            height: 100%;
            transition: width 0.6s ease;
        }
.page-estimator-wrap .bar-target {
            background: var(--primary);
            height: 100%;
            transition: width 0.6s ease;
        }
.page-estimator-wrap .bar-legend {
            display: flex;
            gap: 20px;
            margin-top: 10px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
.page-estimator-wrap .bar-legend span {
            display: flex;
            align-items: center;
            gap: 5px;
        }
.page-estimator-wrap .bar-legend .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
.page-estimator-wrap .bar-legend .dot.s { background: #f59e0b; }
.page-estimator-wrap .bar-legend .dot.t { background: var(--primary); }
.page-estimator-wrap .formula-info {
            margin-top: 20px;
            padding: 16px;
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-radius: 8px;
            font-size: 0.78rem;
            color: #92400e;
            line-height: 1.6;
        }
.page-estimator-wrap .formula-info strong { font-weight: 700; }
.page-estimator-wrap .visual-preview {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
            align-items: flex-end;
        }
.page-estimator-wrap .preview-page { text-align: center; }
.page-estimator-wrap .preview-page .page-label {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
.page-estimator-wrap .preview-paper {
            background: white;
            border: 1.5px solid var(--border);
            border-radius: 3px;
            position: relative;
            margin: 0 auto;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
.page-estimator-wrap .preview-paper .margin-area {
            position: absolute;
            border: 1px dashed #cbd5e1;
            background: rgba(79, 70, 229, 0.04);
        }
.page-estimator-wrap .preview-paper .text-lines {
            position: absolute;
            left: 10%;
            right: 10%;
            top: 15%;
        }
.page-estimator-wrap .preview-paper .text-line {
            height: 2px;
            background: #94a3b8;
            margin-bottom: 4px;
            border-radius: 1px;
            opacity: 0.4;
        }
.page-estimator-wrap .preview-paper .page-count-badge {
            margin-top: 8px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text);
        }
.page-estimator-wrap .font-preview {
            margin-top: 6px;
            padding: 8px 10px;
            background: #f8fafc;
            border-radius: 6px;
            border: 1px solid var(--border);
            font-size: 0.82rem;
            color: var(--text-secondary);
            line-height: 1.4;
        }
.page-estimator-wrap footer {
            text-align: center;
            padding: 32px 0 16px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
.page-estimator-wrap .section-divider {
            height: 1px;
            background: var(--border);
            margin: 20px 0;
        }
