html:has(body.mobile-test){height:auto;min-height:100%;background:#faf6f2}
body.mobile-test{height:auto;min-height:100vh;background:#faf6f2;color:#493c3d;font-family:system-ui,-apple-system,'PingFang SC',sans-serif;font-size:14px;line-height:1.65;overflow-x:clip}
.mobile-test *{box-sizing:border-box}
.mobile-test main{width:100%;max-width:640px;margin:auto;padding:24px 16px 28px}
.mobile-test [x-cloak]{display:none!important}
.mobile-test .m-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mobile-test h1{font-size:24px;font-weight:650;letter-spacing:1px;margin:4px 0}
.mobile-test h2{font-size:18px;font-weight:650;margin:0 0 16px}
.mobile-test h3{font-size:16px;margin:0 0 12px}
.mobile-test small{font-size:9px;letter-spacing:2px;color:#a07878}
.mobile-test .m-badge{border:1px solid #d9bdb7;background:#fffaf8;color:#9b655f;font-size:11px;border-radius:20px;padding:4px 9px;white-space:nowrap}
.mobile-test .m-intro,.mobile-test .m-hint,.mobile-test .m-footer{font-size:12px;color:#8e7c78}
.mobile-test .m-intro{margin:12px 0 22px}
.mobile-test button,.mobile-test .m-download{font:inherit;min-height:44px;padding:9px 13px;border:1px solid #ddc9c3;border-radius:10px;background:#fffaf7;color:#775953;cursor:pointer;text-decoration:none;line-height:1.4}
.mobile-test button:disabled{opacity:.5;cursor:default}
.mobile-test button:focus-visible,.mobile-test input:focus-visible,.mobile-test textarea:focus-visible{outline:2px solid #a35b59;outline-offset:3px}
.mobile-test .m-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;border-bottom:1px solid #e9dcd6;margin-bottom:22px;padding-bottom:14px}
.mobile-test .m-nav button{padding:8px 3px;background:transparent;border-color:transparent;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px}
.mobile-test .m-nav button span{border:1px solid #dccbc5;border-radius:50%;width:22px;height:22px;font-size:11px;line-height:20px}
.mobile-test .m-nav .active{color:#994a51;background:#f4e5df}
.mobile-test .m-nav .active span{color:#fff;background:#a45b61;border-color:#a45b61}
.mobile-test .m-fields{padding:0;margin:0;border:0;min-width:0}
.mobile-test .m-section{margin:0 0 24px;min-width:0}
.mobile-test label{display:block;font-size:13px;margin:0 0 14px}
.mobile-test input:not([type=checkbox]):not([type=color]),.mobile-test textarea{display:block;width:100%;min-width:0;margin-top:6px;min-height:46px;padding:11px 12px;border:1px solid #e1d2cc;background:#fff;border-radius:10px;color:#493c3d;font:inherit;font-size:16px;resize:vertical}
.mobile-test .m-card{background:#fffdfb;border:1px solid #ebded6;padding:16px;margin:16px 0;border-radius:16px;min-width:0;box-shadow:0 5px 20px #71482f04}
.mobile-test .m-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0;min-width:0}
.mobile-test .m-row textarea{flex:1;width:0}
.mobile-test .m-coord{font-size:12px;color:#8b756a}
.mobile-test .m-check{display:flex;align-items:center;gap:10px;margin:12px 0;min-height:44px}
.mobile-test input[type=checkbox]{width:19px;height:19px;accent-color:#a45b61;flex-shrink:0}
.mobile-test input[type=color]{margin-left:auto;width:36px;height:36px;border:0;background:transparent;padding:0}
.mobile-test .m-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mobile-test .m-modes button{line-height:1.8;padding:12px 5px}
.mobile-test .selected{border-color:#b56b73!important;background:#f9eae6!important;color:#934750!important}
.mobile-test .m-templates{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x pan-y;padding:2px 2px 8px;scroll-snap-type:x proximity}
.mobile-test .m-templates button{flex:0 0 76px;scroll-snap-align:start;font-size:11px;white-space:nowrap}
.mobile-test .m-custom-thumb{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1123/794;border:1px dashed #cbaaa3;border-radius:5px;margin-bottom:6px;font-size:24px;color:#a65f67;background:#f5ede6}
.mobile-test .m-custom-upload{margin:12px 0 0}
.mobile-test .m-templates button{padding:7px;overflow:hidden}
.mobile-test .m-templates img{display:block;width:100%;aspect-ratio:1123/794;object-fit:cover;border-radius:5px;margin-bottom:6px}
.mobile-test details{margin-top:16px;border-top:1px solid #ecded8;padding-top:14px}
.mobile-test summary{cursor:pointer;min-height:40px;font-weight:600}
.mobile-test .m-preview-section{margin:20px 0;min-width:0}
.mobile-test .m-preview-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mobile-test .m-preview-heading h2{margin:0}
.mobile-test .app-preview{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:0;width:100%;height:auto;min-height:0;overflow:hidden;border-radius:9px;background:#eee7e0}
.mobile-test .a4-container,.mobile-test #template-stage{margin:0;max-width:none;border-radius:0}
.mobile-test .brand-watermark{position:absolute;right:12px;bottom:8px;z-index:700;color:#777;font-size:10px;pointer-events:none}
.mobile-test .route-empty-tip{font-size:16px}
.mobile-test .m-primary,.mobile-test .m-download{background:#a65f67;color:#fff;border-color:#a65f67}
.mobile-test .m-section>.m-primary{width:100%}
.mobile-test .m-status{font-size:13px;color:#876655;overflow-wrap:anywhere}
.mobile-test .m-result{display:block;width:100%;height:auto;border:1px solid #e4d3c8;border-radius:6px;margin-bottom:14px;touch-action:manipulation}
.mobile-test .m-download{display:block;text-align:center}
.mobile-test .m-payment{border:1px solid #e9d9cf;border-radius:14px;padding:16px;margin:22px 0;background:#f5ede6}
.mobile-test .m-payment p{font-size:12px;color:#8c7770}
.mobile-test .m-actions{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-top:1px solid #e5d5ce;gap:12px}
.mobile-test .m-actions span{font-size:12px;color:#a68c80}
.mobile-test .m-footer{text-align:center;margin:20px 0 0;font-size:11px;line-height:1.9}
.mobile-test .m-notice{padding:12px;background:#f0e7d8;color:#8b6b42;border-radius:10px;font-size:12px;margin-bottom:16px}
.mobile-test .m-search{position:relative}
.mobile-test .poi-suggestions{max-height:220px!important;overscroll-behavior:contain;font-size:14px!important}
.mobile-test .poi-item{min-height:52px;padding:12px!important}
.mobile-test #mobile-load-status{padding:12px;text-align:center}
.mobile-test.is-mobile-picking .app-preview{height:65vh;min-height:360px}
.mobile-test.is-mobile-picking .a4-container{width:100%;height:100%;zoom:1!important}
.mobile-test.is-mobile-picking .preview-header,.mobile-test.is-mobile-picking .preview-steps,.mobile-test.is-mobile-picking .watermark,.mobile-test.is-mobile-picking .map-legend,.mobile-test.is-mobile-picking .map-zoom-slider,.mobile-test.is-mobile-picking .brand-watermark{display:none!important}
.mobile-test.is-mobile-picking .preview-body{width:100%;height:100%;flex:1;padding:0}
.mobile-test.is-mobile-picking .preview-map{width:100%;height:100%;flex:1;min-width:0}
.mobile-test.mobile-capturing .app-preview{overflow:visible}

/* Layout gestures are permitted only on editable template surfaces. */
.mobile-test #template-stage{pointer-events:auto;touch-action:pan-y}
.mobile-test .mobile-layout-locked #template-stage{pointer-events:none}
.mobile-test .dl-module,.mobile-test .cm-module,.mobile-test .dl-handle,.mobile-test .cm-handle,.mobile-test .dl-whandle{touch-action:none}

/* A single persistent dock keeps steps above preview and desktop handoff. */
.mobile-test main{padding-bottom:calc(176px + env(safe-area-inset-bottom,0px))}
.mobile-test .m-dock{position:fixed;z-index:900;left:50%;bottom:0;transform:translateX(-50%);width:100%;max-width:640px;padding:8px 16px calc(8px + env(safe-area-inset-bottom,0px));background:rgba(255,250,247,.97);border-top:1px solid #e5d5ce;box-shadow:0 -5px 24px #71482f0c;backdrop-filter:blur(12px)}
.mobile-test .m-dock .m-nav{margin:0;padding:0 0 6px;border-bottom:0}
.mobile-test .m-dock .m-actions{padding:6px 0 0;display:grid;grid-template-columns:1fr 2fr;gap:10px}
.mobile-test .m-preview-open{border-color:#b56b73;background:#f9eae6;color:#934750;font-weight:600}
body.mobile-test.mobile-preview-open{overflow:hidden}
.mobile-test .toast{bottom:calc(170px + env(safe-area-inset-bottom,0px))}

.mobile-test .m-display-options{margin-top:18px;padding:14px 16px;background:#fffdfb;border:1px solid #ebded6;border-radius:14px}
.mobile-test .m-display-options h3{font-size:14px;margin-bottom:4px}
.mobile-test .m-display-options .m-check{margin:4px 0}
.mobile-test .m-display-options .m-hint{margin:6px 0 0}

.mobile-test .m-preview-capture-source{position:fixed;left:16px;top:0;width:calc(100% - 32px);max-width:608px;z-index:-1;pointer-events:none}
.mobile-test .m-image-modal{position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center;padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px));background:rgba(44,32,31,.65);overflow:auto;overscroll-behavior:contain}
.mobile-test .m-image-card{width:100%;max-width:900px;max-height:100%;overflow:auto;padding:18px 14px;background:#fffaf7;border-radius:16px;box-shadow:0 12px 48px #21141433}
.mobile-test .m-image-card .m-preview-heading{margin-bottom:16px}
.mobile-test .m-image-card h2{margin:0;font-size:18px}
.mobile-test .m-preview-image{display:block;width:100%;height:auto;border-radius:6px}

/* Reset the desktop top anchor; top + bottom would stretch a short toast. */
.mobile-test .toast{top:auto;height:auto;min-height:0;width:max-content;max-width:calc(100vw - 32px);line-height:1.5;overflow-wrap:anywhere}

.mobile-test .m-title-color{display:flex;align-items:center;gap:12px;margin:10px 0 0;min-height:44px}
.mobile-test .m-brand{display:flex;align-items:center;gap:8px;color:#775953;text-decoration:none;margin-bottom:10px}
.mobile-test .m-brand img{flex:none}
.mobile-test .m-brand b{display:block;font-size:13px;line-height:1.4}
.mobile-test .m-brand span span{display:block;font-size:11px;line-height:1.5;color:#8e7c78}
.mobile-test .m-brand:focus-visible{outline:2px solid #a35b59;outline-offset:3px}

.mobile-test .m-step-editor{position:relative;margin-top:16px}
.mobile-test .m-step-editor>details{margin-top:0}
.mobile-test .m-step-editor summary{padding-right:108px;line-height:44px}
.mobile-test .m-step-reset{position:absolute;right:0;top:14px}

.mobile-test .m-generation-cover{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px;background:#faf6f2;text-align:center}
.mobile-test .m-image-modal.m-generating{background:#faf6f2}
body.mobile-test.mobile-capturing{overflow:hidden}

.mobile-test .m-title-font{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;min-height:44px}
.mobile-test .m-title-font select{max-width:68%;min-height:44px;padding:8px;border:1px solid #ddc9c3;border-radius:8px;background:#fff;color:#493c3d;font:inherit;font-size:16px}
.mobile-test a.m-badge{text-decoration:none}
body.mobile-test.mobile-payment-open{overflow:hidden}
.mobile-test .payment-modal{z-index:1400;padding:12px}
.mobile-test .payment-modal-card{width:100%;max-width:560px;padding:16px;max-height:calc(100dvh - 24px)}
.mobile-test .payment-modal-title{font-size:19px;line-height:1.5}
.mobile-test .pay-warning-title{font-size:18px}
.mobile-test .payment-modal-footer{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
/* The mobile universal border-box rule otherwise shrinks the QR content area
   inside its padding, leaving the fixed 240px payment frame outside the border. */
.mobile-test .payment-qr-host{box-sizing:content-box;width:240px;height:240px;padding:10px}

/* Own products: normal flow, never a floating advertisement. */
.own-tools{display:flex;flex-wrap:wrap;gap:8px 16px;padding:12px 0;max-width:100%;font-size:12px;line-height:1.7;text-align:left;align-items:center}.own-tools a{color:inherit!important;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;white-space:normal}.own-tools a:focus-visible{outline:2px solid currentColor;outline-offset:3px}
