/* The phone workflow keeps one selected flower and all precision controls in view. */
.touch-entry{display:none;padding:0 16px 17px;background:#f1f3eb;text-align:center}.touch-entry .button{width:100%;min-height:48px}.touch-entry p{font-size:11px;line-height:1.5;color:#627154;margin:9px 0 0}body.touch-editing{overflow:hidden}
#touchDialog{width:min(720px,100vw);height:min(920px,100dvh);max-width:100vw;max-height:100dvh;margin:auto;padding:0;border:0;overflow:hidden;border-radius:12px;background:#f7f8f1;overscroll-behavior:contain}#touchDialog[open]{display:flex;flex-direction:column}
#touchDialog button{min-width:44px;min-height:44px;touch-action:manipulation}#touchDialog select{font-size:16px;min-height:46px}
.touch-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid #dde3d3;flex-shrink:0}.touch-header .eyebrow{font-size:8px;letter-spacing:1.6px;margin:0 0 4px}.touch-header h2{font-size:23px;letter-spacing:-.5px;line-height:1.1;margin:0}.touch-header .button{padding:9px 16px;font-size:13px}
.touch-picker{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:7px;padding:10px 14px;flex-shrink:0}.touch-picker button{border:1px solid #d3dcc7;border-radius:7px;background:#fffefa;color:#526643;font-size:26px;padding:0}.touch-picker select{min-width:0;padding:9px 7px;background:#fffefa;overflow:hidden;text-overflow:ellipsis}
.touch-canvas-wrap{min-height:100px;flex:1;display:flex;flex-direction:column;background:#e8eddf;padding:8px 12px 0}.touch-artwork{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;touch-action:pan-y;overflow:hidden;user-select:none;-webkit-user-select:none}.touch-artwork>svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}.touch-artwork [data-member]{touch-action:pan-y}.touch-artwork.drag-mode,.touch-artwork.drag-mode [data-member]{touch-action:none;cursor:move}.touch-artwork.drag-mode{outline:2px dashed #a0b38a;outline-offset:-4px}.touch-artwork [data-member]>rect{stroke-width:2;stroke:#667c50;stroke-opacity:0}.touch-artwork [data-member]>rect[stroke-dasharray]{stroke-opacity:0}.touch-artwork [data-member]>rect[stroke="#808b66"]{stroke-opacity:.9;stroke-width:2;fill:#adc48a;fill-opacity:.08}
.touch-view-tools{display:flex;justify-content:center;gap:10px;flex-shrink:0}.touch-view-tools button{border:0;background:none;color:#4e653f;font-size:11px;padding:8px}.touch-view-tools button[aria-pressed=true]{text-decoration:underline;text-underline-offset:4px}
.touch-controls{flex-shrink:0;padding:0 16px;background:#f7f8f1}.touch-tabs{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #dce3d1}.touch-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:#7c896f;font-size:13px}.touch-tabs button[aria-selected=true]{border-color:#546a42;color:#344a23;font-weight:600}.touch-step-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:#637455;margin-top:4px}.touch-step-row>div{display:flex;gap:3px}.touch-step-row button{background:none;border:0;font-size:11px;padding:5px 12px}.touch-step-row button[aria-pressed=true]{color:#3e592d;background:#e6eddb;border-radius:6px}.touch-control-panel{min-height:89px;padding:4px 0 0}.touch-arrows{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:4px auto 0;max-width:360px}.touch-arrows button,.touch-stepper button{border:1px solid #cbd7bf;border-radius:8px;background:#fffefa;color:#526a3e;font-size:27px;padding:0;min-height:50px!important}.touch-stepper{display:grid;grid-template-columns:64px 1fr 64px;gap:12px;align-items:center;max-width:350px;margin:auto}.touch-stepper output{font:27px Georgia,serif;text-align:center;color:#465e35}.touch-control-panel input[type=range]{width:100%;height:32px;accent-color:#607c4a;margin:0;display:block;touch-action:pan-x}.touch-hint{font-size:11px!important;line-height:1.5!important;color:#5f7051;margin:0 0 10px;min-height:17px}
.touch-footer{margin:0;padding:8px 14px max(8px,env(safe-area-inset-bottom));border-top:1px solid #d5dfc9;display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;max-width:none;background:#edf2e5;flex-shrink:0}.touch-footer>div{display:flex;gap:7px}.touch-footer button{border:1px solid #cad6bd;background:#fbfdf7;border-radius:7px;color:#52673f;padding:7px 10px;font-size:12px}.touch-footer #touchRedo{font-size:21px;padding:5px}.touch-footer #touchLock[aria-pressed=true]{background:#d8e5c9;border-color:#829e6a}
@media(max-width:700px),(pointer:coarse){.touch-entry{display:block}.art-paper g[data-member]{touch-action:pan-y}.preview-hint{font-size:11px}.preview-toolbar{height:auto;min-height:54px;gap:8px}.preview-toolbar .tools{gap:5px}.preview-toolbar .icon-button{width:44px;height:44px;flex-shrink:0}.preview-toolbar .text-button{min-height:44px}.preview-toolbar .live-tag{font-size:7px;letter-spacing:.6px;white-space:nowrap}.person-flower{min-width:44px;min-height:54px}.person-card{grid-template-columns:44px minmax(0,1fr) 44px;gap:7px;padding:9px}.remove-person{width:44px;height:44px}.person-fields{grid-template-columns:1fr}.person-fields input{font-size:16px!important;min-height:44px!important;height:44px!important}.person-fields select{font-size:16px;min-height:44px!important;height:44px}.person-flower-label{font-size:11px}.panel-tabs button,.gift-preset,.choice,.palette,.load-project{min-height:44px}.editor-panel>section>input:not([type=checkbox]):not([type=range]){font-size:16px}.preview-format select{font-size:16px;min-height:44px;width:115px}.preview-bottom .text-button{min-height:44px}.stem-inspector{display:none!important}.art-stage{padding-left:25px;padding-right:25px}.art-paper{max-width:320px}.dialog-close{min-width:44px;min-height:44px}}
@media(max-width:700px){#touchDialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.touch-header{padding-top:max(10px,env(safe-area-inset-top));padding-bottom:10px}.touch-footer{padding-bottom:max(10px,env(safe-area-inset-bottom))}#toast{z-index:12}.touch-view-tools{gap:2px}}
@media(max-width:360px){.touch-picker{gap:4px;padding-left:8px;padding-right:8px}.touch-picker select{font-size:16px;letter-spacing:-.4px}.touch-controls{padding:0 12px}.touch-footer{padding-left:10px;padding-right:10px}.touch-footer>div{gap:4px}.touch-footer button{padding:6px 8px}.preview-toolbar{padding-left:10px;padding-right:10px}.preview-toolbar .live-tag{font-size:6px;letter-spacing:0}.preview-bottom{flex-wrap:wrap;justify-content:space-between}.preview-bottom .text-button{font-size:11px}}
@media(max-height:620px) and (min-width:600px){#touchDialog[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;height:100dvh;width:100vw;max-width:100vw;border-radius:0}.touch-header{grid-column:1/-1}.touch-picker{grid-column:1;grid-row:2}.touch-canvas-wrap{grid-column:1;grid-row:3/5;min-height:0}.touch-controls{grid-column:2;grid-row:2/4;align-self:center}.touch-footer{grid-column:2;grid-row:4}.touch-view-tools{gap:0}.touch-view-tools button{font-size:10px;padding-left:5px;padding-right:5px}}

.canvas-controls{display:none;width:100%;max-width:320px;margin:14px auto 0;border:1px solid #c6d0b9;border-radius:10px;background:#fffef9;box-shadow:0 3px 12px #35452310;padding:6px 9px 5px;text-align:left;line-height:1.4}.canvas-control-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.canvas-control-heading strong{display:block;font-size:12px;font-weight:600;overflow-wrap:anywhere}.canvas-control-heading output{font-size:11px;color:#657451}.canvas-controls button{min-width:44px;min-height:44px;touch-action:manipulation}.canvas-control-heading>button{border:0;background:none;font-size:22px;color:#758165;flex-shrink:0}.canvas-button-row{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:5px;margin:5px 0}.canvas-button-row button{padding:3px;border:1px solid #d5deca;border-radius:6px;background:#f7f9f1;font-size:24px;color:#4b6437;line-height:1}.canvas-button-row small{display:block;font-size:9px;margin-top:3px;line-height:1.1}.canvas-moves button{font-size:21px}.canvas-options{display:grid;grid-template-columns:1fr 1fr 1fr;gap:3px}.canvas-options button{background:none;border:0;font-size:10px;color:#62744f;padding:2px}.canvas-options button[aria-pressed=true]{color:#30451f;background:#e7eedc;border-radius:6px}.canvas-controls p{font-size:10px;color:#64734f;margin:2px 0 3px;text-align:center}.art-paper.drag-mode,.art-paper.drag-mode g[data-member]{touch-action:none;cursor:move}.art-paper.drag-mode{outline:2px dashed #8da674;outline-offset:4px}
@media(max-width:700px),(pointer:coarse){.canvas-controls{display:block}.art-stage:has(.canvas-controls:not([hidden])){padding-left:14px;padding-right:14px}.art-stage:has(.canvas-controls:not([hidden])) .stage-caption{display:none}.art-paper.drag-mode g[data-member]{touch-action:none}}
