:root {
            --a4h-red: #ef4c62;
            --a4h-red-dark: #d7354d;
            --text: #30333a;
            --muted: #6b7280;
            --line: #e6e8ee;
            --soft: #fff4f6;
            --soft-2: #fbfbfd;
            --bg: #f6f7fb;
            --card: #ffffff;
            --ok: #047857;
            --warn: #b45309;
            --danger: #b91c1c;
            --focus: rgba(239, 76, 98, .22);
            --radius: 22px;
            --shadow: 0 14px 36px rgba(15, 23, 42, .07);
        }
        * { box-sizing: border-box; }
        html { -webkit-text-size-adjust: 100%; }
        body {
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            background: radial-gradient(circle at top left, #fff 0, var(--bg) 36%, var(--bg) 100%);
            color: var(--text);
            line-height: 1.45;
        }
        button, input, textarea, select { font: inherit; }
        .page {
            width: min(1180px, calc(100% - 28px));
            margin: 18px auto 46px;
        }
        .hero {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 18px;
            padding: 20px;
            border: 1px solid var(--line);
            background: rgba(255,255,255,.92);
            border-radius: 28px;
            box-shadow: var(--shadow);
        }
        .brand { display: inline-flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
        .brand-logo { display: block; width: min(430px, 68vw); height: auto; object-fit: contain; }
        .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
        h1, h2, h3 { margin: 0; }
        h1 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.03em; }
        .sub { color: var(--muted); font-size: .95rem; margin-top: 2px; }
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--a4h-red);
            color: white;
            border-radius: 999px;
            padding: 10px 16px;
            font-weight: 900;
            white-space: nowrap;
        }
        .layout {
            display: grid;
            grid-template-columns: 310px 1fr;
            gap: 18px;
            margin-top: 18px;
            align-items: start;
        }
        .assistant-panel {
            position: sticky;
            top: 14px;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            background: var(--card);
            box-shadow: var(--shadow);
            padding: 16px;
        }
        .assistant-head {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--line);
        }
        .avatar {
            width: 44px;
            height: 44px;
            border-radius: 16px;
            background: linear-gradient(145deg, var(--a4h-red), #ff7a8c);
            color: white;
            display: grid;
            place-items: center;
            font-weight: 900;
            flex: 0 0 auto;
        }
        .assistant-text { color: var(--muted); font-size: .92rem; margin-top: 4px; }
        .steps { display: grid; gap: 9px; margin: 14px 0; }
        .step-btn {
            appearance: none;
            width: 100%;
            text-align: left;
            border: 1px solid var(--line);
            background: #fff;
            border-radius: 16px;
            padding: 12px;
            display: flex;
            gap: 10px;
            align-items: center;
            cursor: pointer;
            color: var(--text);
        }
        .step-btn[aria-current="step"] {
            border-color: rgba(239,76,98,.45);
            background: var(--soft);
            box-shadow: 0 0 0 4px rgba(239,76,98,.08);
        }
        .step-no {
            width: 30px;
            height: 30px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            color: white;
            background: var(--a4h-red);
            font-weight: 900;
            flex: 0 0 auto;
        }
        .step-title { font-weight: 900; }
        .step-caption { color: var(--muted); font-size: .82rem; margin-top: 1px; }
        .mini-summary {
            background: var(--soft-2);
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 12px;
            margin-top: 12px;
        }
        .mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
        .mini-row:last-child { border-bottom: 0; }
        .mini-row strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
        form { min-width: 0; }
        .screen {
            display: none;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            background: rgba(255,255,255,.96);
            box-shadow: var(--shadow);
            padding: 20px;
        }
        .screen.active { display: block; }
        .screen-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
        }
        .screen-kicker { color: var(--a4h-red); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
        .screen h2 { font-size: clamp(1.25rem, 2.5vw, 1.85rem); letter-spacing: -.02em; }
        .hint { color: var(--muted); font-size: .9rem; margin-top: 6px; }
        .hint.compact { font-size: .82rem; margin-top: 5px; }
        .required-note { color: var(--muted); font-size: .86rem; }
        .grid { display: grid; gap: 14px; }
        .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .box {
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 14px;
            background: var(--soft-2);
        }
        .box.white { background: white; }
        .box-title {
            display: flex;
            align-items: center;
            gap: 9px;
            margin-bottom: 10px;
            font-weight: 900;
        }
        .circle {
            width: 30px;
            height: 30px;
            display: inline-grid;
            place-items: center;
            border-radius: 999px;
            background: var(--a4h-red);
            color: white;
            font-weight: 900;
        }
        label { display: block; font-size: .9rem; font-weight: 850; margin: 10px 0 6px; }
        input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], textarea {
            width: 100%;
            border: 1px solid #d9dee8;
            border-radius: 13px;
            padding: 12px 13px;
            background: white;
            color: var(--text);
            min-height: 48px;
        }
        input[readonly] { background: #f8fafc; color: var(--a4h-red); font-weight: 900; letter-spacing: .02em; }
        input[readonly]:focus { border-color: #d9dee8; box-shadow: none; }
        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--a4h-red);
            box-shadow: 0 0 0 4px var(--focus);
        }
        textarea { min-height: 112px; resize: vertical; }
        .check-row, .radio-row {
            display: flex;
            align-items: center;
            gap: 10px;
            border: 1px solid var(--line);
            background: white;
            border-radius: 14px;
            padding: 12px;
            font-weight: 800;
            cursor: pointer;
        }
        .check-row input, .radio-row input { width: 22px; height: 22px; accent-color: var(--a4h-red); }
        .shipping-fields.is-hidden { display: none; }
        .product-list { display: grid; gap: 10px; }
        .product-card {
            border: 1px solid var(--line);
            background: white;
            border-radius: 18px;
            padding: 13px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 210px 150px;
            gap: 14px;
            align-items: center;
        }
        .product-name { font-weight: 900; }
        .product-meta { color: var(--muted); font-size: .86rem; margin-top: 3px; }
        .qty-block {
            display: grid;
            gap: 6px;
            justify-items: center;
            align-items: center;
        }
        .qty-label {
            color: var(--muted);
            font-size: .76rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: .06em;
        }
        .qty-control {
            display: grid;
            grid-template-columns: 50px 82px 50px;
            gap: 8px;
            align-items: center;
            justify-content: center;
        }
        .qty-control button {
            width: 50px;
            height: 50px;
            border: 0;
            border-radius: 14px;
            background: #eef1f6;
            color: var(--text);
            font-weight: 900;
            cursor: pointer;
            font-size: 1.28rem;
            line-height: 1;
        }
        .qty-control input {
            width: 82px;
            min-height: 50px;
            text-align: center;
            padding: 8px 6px;
            border: 2px solid #cbd5e1;
            border-radius: 14px;
            background: #fff;
            color: var(--text);
            font-size: 1.2rem;
            font-weight: 900;
            font-variant-numeric: tabular-nums;
            appearance: textfield;
            -moz-appearance: textfield;
        }
        .qty-control input::-webkit-outer-spin-button,
        .qty-control input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .line-total { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
        .price-note { color: var(--muted); font-size: .82rem; margin-top: 2px; }
        .pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
        .summary-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; }
        .summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
        .summary-row:last-child { border-bottom: 0; }
        .summary-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
        .summary-row.total { font-size: 1.12rem; }
        .summary-row.total strong { color: var(--a4h-red); }
        .signature-area {
            border: 1px dashed #cbd5e1;
            background: #fff;
            border-radius: 18px;
            padding: 10px;
            margin-top: 10px;
            -webkit-user-select: none;
            user-select: none;
        }
        #signature-pad {
            width: 100%;
            height: 230px;
            display: block;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            touch-action: none;
            -ms-touch-action: none;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            overscroll-behavior: contain;
        }
        .signature-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
        .error-box {
            display: none;
            margin: 12px 0;
            background: #fff1f2;
            border: 1px solid #fecdd3;
            color: var(--danger);
            border-radius: 14px;
            padding: 12px 14px;
            font-weight: 850;
        }
        .nav {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid var(--line);
        }
        .btn {
            border: 0;
            border-radius: 15px;
            padding: 13px 18px;
            font-weight: 900;
            cursor: pointer;
            min-height: 50px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .btn-primary { background: var(--a4h-red); color: #fff; box-shadow: 0 12px 22px rgba(239,76,98,.22); }
        .btn-primary:active { background: var(--a4h-red-dark); transform: translateY(1px); }
        .btn-secondary { background: #eef1f6; color: var(--text); }
        .btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
        .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
        .finish-bar {
            position: sticky;
            bottom: 0;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
            background: linear-gradient(180deg, rgba(246,247,251,0), var(--bg) 28%);
            z-index: 5;
        }
        .legal { color: var(--muted); font-size: .84rem; margin-top: 14px; }
        @media (max-width: 920px) {
            .layout { grid-template-columns: 1fr; }
            .assistant-panel { position: static; }
            .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
            .step-btn { padding: 10px; align-items: flex-start; }
            .step-caption { display: none; }
            .step-title { font-size: .82rem; }
        }
        @media (max-width: 760px) {
            .page { width: min(100% - 18px, 1180px); margin-top: 9px; }
            .hero, .screen { padding: 15px; border-radius: 20px; }
            .hero { align-items: flex-start; flex-direction: column; }
            .brand-logo { width: min(360px, 86vw); }
            .badge { white-space: normal; }
            .grid.two, .grid.three, .pay-grid { grid-template-columns: 1fr; }
            .steps { grid-template-columns: 1fr; }
            .product-card { grid-template-columns: 1fr; }
            .qty-block { justify-items: start; }
            .qty-control { justify-content: start; }
            .line-total { text-align: left; }
            .screen-head { flex-direction: column; }
            .nav { flex-direction: column-reverse; }
            .nav .btn, .finish-bar .btn { width: 100%; }
            #signature-pad { height: 260px; }
        }
        @media print {
            body { background: white; }
            .assistant-panel, .nav, .finish-bar, .error-box, .btn-secondary, .btn-ghost { display: none !important; }
            .layout { display: block; }
            .screen { display: block !important; box-shadow: none; page-break-inside: avoid; margin-bottom: 12px; }
            .hero { box-shadow: none; }
        }
