.editor-mode-choice{
  margin:0 0 18px;padding:18px;border:1px solid #d7e1f3;border-radius:20px;background:#fff;
  box-shadow:0 10px 30px rgba(35,60,116,.08)
}
.upload-panel[hidden]{display:none!important}
.welcome-grid.is-complete{grid-template-columns:1fr}
.welcome-grid.is-complete .order-card{width:100%;max-width:760px;margin:0 auto}
.editor-mode-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:13px}
.editor-mode-heading h2{margin:0;color:#192239;font-size:1.18rem;line-height:1.35}
.editor-mode-heading>span{color:#748096;font-size:.78rem}
.editor-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.editor-mode-card{
  display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:88px;
  padding:13px 15px;border:1.5px solid #dbe3f1;border-radius:17px;background:#fff;color:#20283b;
  text-align:left;cursor:pointer;transition:.18s ease
}
.editor-mode-card:hover{border-color:#7594d7;box-shadow:0 8px 20px rgba(41,69,132,.1);transform:translateY(-1px)}
.editor-mode-card:focus-visible{outline:3px solid rgba(56,96,190,.24);outline-offset:3px}
.editor-mode-card.is-selected{border-color:#3860be;background:#eef3ff;box-shadow:0 0 0 3px rgba(56,96,190,.1)}
.editor-mode-card img{display:block;width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 5px 8px rgba(39,66,126,.12))}
.editor-mode-card>span{display:grid;gap:3px;min-width:0}
.editor-mode-card strong{font-size:.98rem;line-height:1.35}
.editor-mode-card small{color:#6b7588;font-size:.79rem;line-height:1.45}
.editor-mode-card>b{color:#3860be;font-size:1.45rem}
.editor-view.is-awaiting-mode .editor-grid{grid-template-columns:1fr}
.editor-view.is-admin-mode .image-viewport{pointer-events:none}
#self-controls[hidden],#admin-inline-panel[hidden],#self-action-bar[hidden],.admin-help-bottom[hidden],#admin-success-view[hidden]{display:none!important}
.admin-inline-panel{
  display:grid;align-content:start;gap:18px;padding:24px;border:1px solid #dbe3f2;border-radius:20px;
  background:#fff;box-shadow:0 14px 38px rgba(30,52,102,.09)
}
.admin-inline-head{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #e5e9f1}
.admin-inline-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#eaf1ff;color:#3860be;font-size:1.35rem}
.admin-inline-head h2{margin:0;color:#1c263a;font-size:1.12rem}
.admin-inline-head p{margin:3px 0 0;color:#6c7588;font-size:.82rem;line-height:1.5}
.admin-comment{display:grid;gap:7px}.admin-comment>span,.admin-sheet-picker strong{color:#25304a;font-weight:900}
.admin-comment textarea{width:100%;min-height:126px;padding:13px 14px;border:1.5px solid #cfd8e8;border-radius:14px;color:#1d2637;font:inherit;line-height:1.55;resize:vertical}
.admin-comment textarea:focus{border-color:#3860be;outline:3px solid rgba(56,96,190,.12)}
.admin-comment small{justify-self:end;color:#8790a1}
.admin-sheet-picker{display:grid;gap:12px;padding:16px;border-radius:17px;background:#f5f7fb}
.admin-sheet-picker>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center}
.admin-sheet-picker>div:first-child span{color:#70798a;font-size:.78rem}
.admin-sheet-picker .quantity-row{margin-top:0}
.admin-privacy{padding:11px 13px;border-radius:12px;background:#fff7e6;color:#76531a;font-size:.78rem;line-height:1.4}
.admin-submit{min-height:54px}
.controls-card,.admin-inline-panel{scroll-margin-top:16px}
.admin-success-view{max-width:650px;margin:0 auto}
.admin-mark{background:#eef5ff!important;color:#3860be!important}
.admin-ticket{display:flex;justify-content:space-between;gap:16px;margin:20px 0 0;padding:14px 16px;border-radius:14px;background:#f4f6fa;color:#667085}
.admin-ticket strong{color:#27334b}
.admin-tracking-note{display:grid;gap:6px;margin:14px 0 18px;padding:16px;border:1px solid #cbd9f5;border-radius:16px;background:#f3f7ff;text-align:left}
.admin-tracking-note strong{color:#24365e;font-size:.95rem}.admin-tracking-note span{color:#485775;line-height:1.55}.admin-tracking-note small{color:#748096;font-size:.76rem;line-height:1.45}
.admin-original-preview{border-radius:12px!important;background:#f5f7fb!important;aspect-ratio:1/1!important}
.admin-original-preview img{width:100%!important;height:100%!important;object-fit:contain!important;transform:none!important}
.design-detail-admin-comment{margin:14px 0 0;padding:16px;border:1px solid #d7e1f3;border-radius:15px;background:#f4f7fd;text-align:left}
.design-detail-admin-comment strong{display:block;color:#25304a;font-size:.84rem}.design-detail-admin-comment p{margin:7px 0 0;color:#4f5d76;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.design-detail-admin-comment[hidden],#design-detail-shape-row[hidden],#design-detail-size-row[hidden]{display:none!important}

@media(max-width:760px){
  .editor-mode-choice{margin-bottom:12px;padding:14px;border-radius:18px}
  .editor-mode-heading{align-items:start;margin-bottom:10px}.editor-mode-heading h2{font-size:1.08rem}.editor-mode-heading>span{font-size:.72rem}
  .editor-mode-grid{grid-template-columns:1fr;gap:8px}
  .editor-mode-card{grid-template-columns:52px minmax(0,1fr) auto;min-height:78px;padding:11px 12px;border-radius:15px}
  .editor-mode-card img{width:52px;height:52px}.editor-mode-card strong{font-size:.94rem}.editor-mode-card small{font-size:.76rem}
  .admin-inline-panel{padding:18px;border-radius:18px}.admin-inline-head{grid-template-columns:42px minmax(0,1fr)}.admin-inline-icon{width:42px;height:42px}
  .admin-comment textarea{min-height:116px}
  .confirm-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
  .confirm-dialog form{max-height:calc(100dvh - 24px);padding:24px 16px}
  .dialog-designs{max-height:38dvh;gap:9px;margin:16px 0 10px;padding-right:2px}
  .dialog-design{display:grid;grid-template-columns:68px minmax(0,1fr);grid-template-areas:"preview info";align-items:start;gap:11px;min-height:150px;padding:11px 11px 64px}
  .dialog-design-preview{grid-area:preview;width:68px!important;height:68px!important;max-width:68px;max-height:68px}
  .dialog-design-info{grid-area:info;min-width:0;overflow:hidden}
  .dialog-design-info strong{display:block;max-height:2.8em;white-space:normal;overflow:hidden;overflow-wrap:anywhere;line-height:1.4}
  .dialog-design-info span{display:block;max-height:2.9em;overflow:hidden;overflow-wrap:anywhere;margin-top:4px;line-height:1.45}
  .dialog-design-sheets{position:absolute;left:90px;bottom:31px;min-width:0;width:auto;margin:0;padding:6px 10px}
  .dialog-design:after{content:"แตะดูรายละเอียด →";position:absolute;right:11px;bottom:8px;color:var(--muted);font-size:.68rem;font-weight:700}
}

@media(max-width:420px){
  .editor-mode-heading{display:block}.editor-mode-heading>span{display:block;margin-top:3px}
  .editor-mode-card{grid-template-columns:48px minmax(0,1fr) auto}.editor-mode-card img{width:48px;height:48px}
  .admin-sheet-picker .quantity-row{justify-content:flex-start}
}
