:root { --navy:#3D4559; --coral:#D96268; --blush:#F6E6E7; --sky:#EAF0F5; --paper:#FBF7F6; --line:#E4DCCF; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color:var(--navy); background:var(--paper); }
.top { display:flex; align-items:center; gap:12px; padding:10px 18px; background:#fff; border-bottom:1px solid var(--line); }
.top strong { font-family: Georgia, serif; font-size:18px; }
.spacer { flex:1; }
.muted { color:#6A7185; } .small { font-size:12px; }
.badge { background:var(--coral); color:#fff; border-radius:3px; padding:2px 8px; font-size:11px; letter-spacing:.08em; }
.order input { margin-left:6px; padding:6px 8px; border:1px solid var(--line); border-radius:2px; width:170px; }
.layout { display:grid; grid-template-columns: 340px 6px 1fr; height: calc(100vh - 52px); }
.panel { overflow-y:auto; padding:14px 16px; background:#fff; border-right:1px solid var(--line); }
.panel section { margin-bottom:18px; }
.panel h3 { font-family: Georgia, serif; font-weight:normal; font-size:16px; margin:0 0 8px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chips button, .row button, button.ghost { border:1px solid var(--navy); background:#fff; color:var(--navy); padding:6px 10px; border-radius:2px; cursor:pointer; font-size:13px; }
.chips button.on { background:var(--navy); color:#fff; }
.list { display:grid; grid-template-columns: 1fr 1fr; gap:6px; }
.list button { border:1px solid var(--line); background:var(--paper); padding:10px 6px; cursor:pointer; font-size:12px; border-radius:2px; text-align:center; }
.list button.on { border-color:var(--navy); background:var(--sky); }
.tools textarea, .tools select { width:100%; margin:6px 0; padding:8px; border:1px solid var(--line); border-radius:2px; font:inherit; }
.tools label { display:block; font-size:13px; margin-top:6px; }
.row { display:flex; gap:6px; margin:6px 0; }
.icons { display:grid; grid-template-columns: repeat(5, 1fr); gap:6px; }
.icons button { aspect-ratio:1; border:1px solid var(--line); background:#fff; padding:4px; cursor:pointer; border-radius:2px; }
.icons img { width:100%; height:100%; object-fit:contain; }
.stage { display:flex; flex-direction:column; align-items:center; padding:12px; overflow:auto; background:var(--sky); }
.canvasWrap { box-shadow: 0 6px 24px rgba(61,69,89,.12); background:#fff; }
.actions { display:flex; align-items:center; gap:10px; margin-top:10px; }
button.primary { background:var(--navy); color:#fff; border:0; padding:10px 18px; border-radius:2px; cursor:pointer; font-size:14px; }
.warn { background:var(--coral); color:#fff; padding:8px 14px; border-radius:2px; margin-bottom:8px; font-size:13px; }
.adm { max-width:1000px; margin:0 auto; padding:18px; }
.adm section { background:#fff; border:1px solid var(--line); padding:16px; margin-bottom:16px; }
.adm h2 { font-family: Georgia, serif; font-weight:normal; margin:0 0 10px; }
.adm form { display:flex; flex-wrap:wrap; gap:8px; align-items:end; margin-bottom:12px; }
.adm form label { display:flex; flex-direction:column; font-size:12px; gap:3px; }
.adm input, .adm select { padding:6px 8px; border:1px solid var(--line); border-radius:2px; }
.adm table { width:100%; border-collapse:collapse; font-size:13px; }
.adm td, .adm th { border-bottom:1px solid var(--line); padding:6px; text-align:left; vertical-align:middle; }
.adm .sample { font-size:24px; }
.adm .ic { display:grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap:6px; }
.adm .ic div { border:1px solid var(--line); aspect-ratio:1; position:relative; min-width:0; overflow:hidden; }
.adm .ic img { display:block; width:100%; height:100%; object-fit:contain; }
.adm .ic button { position:absolute; top:2px; right:2px; font-size:10px; }
.adm .note { font-size:12px; color:#6A7185; }

.stagebar { display:flex; justify-content:space-between; align-items:center; width:100%; max-width:720px; margin-bottom:8px; font-size:14px; }
.stagebar #sizeLabel { font-weight:600; font-size:20px; font-family: Georgia, serif; flex:1; text-align:center; }
.stagebar button { border:1px solid var(--navy); background:#fff; color:var(--navy); padding:5px 10px; border-radius:2px; cursor:pointer; }
.stagebar button:disabled { opacity:.35; cursor:default; }
.list button.tpl { display:flex; flex-direction:column; align-items:center; gap:4px; padding:6px; }
.list .thumb { display:flex; align-items:center; justify-content:center; width:100%; height:150px; background:#fff; }
.list .thumb img { max-width:100%; max-height:100%; box-shadow:0 1px 4px rgba(61,69,89,.15); }

.splitter { cursor: col-resize; background: var(--line); }
.splitter:hover { background: var(--navy); }
.cats { margin-bottom: 8px; }
.cats button { font-size: 12px; padding: 4px 8px; }
.zoom { display:flex; align-items:center; gap:4px; }
.zoom span { min-width: 46px; text-align:center; font-size:13px; }
.stage .hint { margin: -4px 0 6px; }
.canvasWrap { overflow: hidden; flex-shrink: 0; }   /* sığmayınca sahne kayar; tuval sıkışıp kırpılmaz */
.stagebar { flex-wrap: wrap; row-gap: 6px; }
.stagebar #sizeLabel { flex-basis: 100%; order: -1; }
.zoom button { font-size: 18px; min-width: 38px; padding: 4px 10px; font-weight: 600; }
.zoom button#zoomFit { font-size: 13px; font-weight: normal; }

.centerToggle { border: 2px solid var(--navy); background: #fff; color: var(--navy); padding: 6px 14px; border-radius: 20px;
  cursor: pointer; font-size: 15px; font-weight: 600; }
.centerToggle small { font-weight: normal; font-size: 11px; opacity: .8; }
.centerToggle.on { background: #2F6FD6; border-color: #2F6FD6; color: #fff; }
.stage { align-items: stretch; }
.stage .stagebar, .stage .hint, .stage .warn, .stage .actions { align-self: center; }
.canvasWrap { align-self: center; background: #fff; border-radius: 4px; }

.top .brand { font-size: 26px; letter-spacing: .04em; }
.top .brandlogo { height:44px; width:auto; }
.admnav { display:flex; gap:18px; padding:8px 18px; background:var(--sky); border-bottom:1px solid var(--line); font-size:14px; position:sticky; top:0; z-index:5; }
.admnav a { color:var(--navy); text-decoration:none; font-weight:600; }
.pill { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--paper); padding:5px 8px; border-radius:16px; font-size:13px; }
.pill button { border:0; background:transparent; cursor:pointer; color:var(--coral); font-size:15px; padding:0 2px; }
.grptabs { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.grptabs button { padding:8px 14px; border:1px solid var(--line); background:var(--paper); border-radius:6px; cursor:pointer; }
.grptabs button.on { background:var(--ink, #3D4559); color:#fff; }
.catrow { margin:8px 0; line-height:2.2; }
.tplcat { font-family: Georgia, serif; font-weight:normal; margin:16px 0 8px; border-bottom:1px solid var(--line); padding-bottom:4px; }
.tplgrid { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:10px; }
.tplcard { border:1px solid var(--line); padding:8px; font-size:13px; display:flex; flex-direction:column; gap:4px; background:#fff; }
.tplcard .thumb { height:170px; display:flex; align-items:center; justify-content:center; background:var(--paper); }
.tplcard .thumb img { max-height:100%; max-width:100%; }
.tplcard .links { font-size:12px; }
.warnTxt { color:var(--coral); font-size:12px; }
/* Panel genişledikçe kartlar büyümez, yan yana daha çok kart sığar */
.panel .list { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); }   /* 21 Kas: dar panelde de 2 sütun */
.panel .list .thumb { height: 160px; }
.panel .icons { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }

.fontbox { margin: 8px 0; }
.fcats { margin: 6px 0; }
.fcats button { font-size: 12px; padding: 4px 8px; }
.flist { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); background: #fff; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fopt { border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: center; padding: 10px 8px; cursor: pointer;
  font-size: 22px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); min-height: 52px; }
.fopt:hover { background: var(--sky); }
.fopt[data-name]::after { content: attr(data-name); display: block; font: 11px Arial, sans-serif; color: #777; margin-top: 2px; }
.flist .fontsall { grid-column:1/-1; font:600 13px sans-serif; color:var(--accent, #3D4559); }
#fontFind { width: 100%; box-sizing: border-box; margin: 4px 0; padding: 6px 8px; }
.fopt.on { background: var(--blush); outline: 2px solid var(--coral); outline-offset: -2px; }

[hidden] { display: none !important; }

.syncbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 18px; background:var(--blush); font-size:13px; }
.syncbar button { border:1px solid var(--navy); background:#fff; color:var(--navy); padding:4px 10px; border-radius:2px; cursor:pointer; }

.gate { position: fixed; inset: 0; background: rgba(61,69,89,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.gatebox { background: #fff; width: min(440px, 92vw); padding: 26px; border-radius: 4px; display: grid; gap: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.gatebox h2 { font-family: Georgia, serif; font-weight: normal; margin: 0; }
.gatebox label { display: grid; gap: 4px; font-size: 14px; }
.gatebox input:not([type=radio]) { padding: 10px; border: 1px solid var(--line); border-radius: 2px; font: inherit; }
.gatebox .plat { gap: 14px; }
.gatebox .plat label { display: flex; align-items: center; gap: 6px; }
.gatebox .err { color: var(--coral); min-height: 1.1em; font-size: 13px; }
.order select { padding: 4px 6px; border: 1px solid var(--line); max-width: 360px; }
.linkbtn { border: 0; background: none; color: var(--coral); cursor: pointer; text-decoration: underline; font-size: 12px; }

/* sipariş onayı */
.citems { display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.citem { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; border: 1px solid var(--line); padding: 8px; }
.citem img { width: 96px; height: 96px; object-fit: cover; background: #f4f4f4; }
.citem .t { font-size: 14px; }
.citem .s { font-weight: bold; margin-top: 4px; }
.citem .p { white-space: pre-wrap; font-size: 13px; color: #555; margin-top: 4px; }
.cbtns { gap: 10px; }
.chips button:disabled { opacity: .35; cursor: not-allowed; }
.notice { background: #fff6e5; border: 1px solid #f0d9a8; padding: 8px 12px; margin: 6px 0; font-size: 14px; }

/* renk seçici */
.colorbox { margin: 8px 0; }
.clothbox { margin: 8px 0; padding: 6px 0; border-top: 1px solid var(--line); }
.clothfonts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.clothfont { font-size: 18px; padding: 4px 8px; min-height: 0; }
.clothbox .row button.on { background: var(--navy); color: #fff; }
.clothpats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.clothpat { width: 30px; height: 30px; padding: 0; border: 3px solid; border-radius: 6px; background-size: 22px; cursor: pointer; }
.clothpat.on { outline: 2px solid var(--navy); outline-offset: 2px; }
.clothstitch { flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.clothstitch button { padding: 2px 6px; font-size: 12px; }
.clothstitch button.on { background: var(--navy); color: #fff; }
.clothstitch input[type=color] { width: 28px; height: 22px; padding: 0; border: 1px solid var(--line); }
.clothpats.picking .clothpat { opacity: .45; } .clothpats.picking .clothpat.on { opacity: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #bbb; padding: 0; cursor: pointer; }
.swatches button.on { outline: 2px solid var(--coral); outline-offset: 2px; }
.swatches label.custom { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.swatches input[type=color] { width: 30px; height: 28px; border: 1px solid #bbb; padding: 0; background: none; cursor: pointer; }
.liclegend { margin: 4px 0; }
.licdots { display: block; font-size: 11px; margin-top: 2px; }
.licdots b { font-weight: bold; }
.lictoggle { font-size: 12px; }
.lictoggle.on { background: #fff3e0; border-color: #e67e00; }
body.ascust::before { content:"👁 Customer view (preview)"; position:fixed; top:6px; left:50%; transform:translateX(-50%); z-index:99;
  background:#e67e00; color:#fff; font:600 12px sans-serif; padding:3px 12px; border-radius:999px; pointer-events:none; }

/* kumaş rengi (B5) ve ölçü değiştirme (B3) */
.fabricrow { display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; }
.fabrics { display:flex; gap:6px; flex-wrap:wrap; }
.fabrics .fab { display:flex; align-items:center; gap:5px; border:1px solid var(--line); background:#fff; padding:4px 9px; border-radius:2px; cursor:pointer; font-size:12px; }
.fabrics .fab span { width:14px; height:14px; border:1px solid #999; display:inline-block; }
.fabrics .fab.on { border-color:var(--navy); box-shadow:0 0 0 1px var(--navy); }
.fabrics .fab:disabled { opacity:.35; cursor:not-allowed; }
.sizechanged { color:#D0021B; font-weight:700; width:100%; }
.customsize { align-items:center; gap:6px; flex-wrap:wrap; }
.customsize label { display:flex; align-items:center; gap:4px; }
.customsize input { width:70px; padding:6px; }

/* vektöre çevirme (B8) */
.vecbox { border-top:2px solid var(--navy); }
.vecbox label.small { display:flex; align-items:center; gap:6px; margin:4px 0; }
.vecprev { margin:6px 0; background:repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; border:1px solid var(--line); text-align:center; }
.vecprev img { max-width:100%; max-height:220px; display:block; margin:0 auto; }
.filebtn { display:inline-block; border:1px solid var(--navy); padding:6px 10px; cursor:pointer; font-size:13px; color:var(--navy); }

.vecbox .tiny { font-size:11px; margin:-2px 0 6px; line-height:1.3; }

.vecbusy { background:#FFF4D6; border:1px solid #E0B84C; color:#7A5A00; padding:8px 10px; margin:6px 0; font-size:13px; font-weight:600; }
.vecdone { background:#E7F6EA; border:1px solid #4CAF66; color:#1E6B34; padding:8px 10px; margin:6px 0; font-size:13px; line-height:1.4; }
.vecrecent { margin:6px 0; }
#vecRecentList { display:flex; flex-wrap:wrap; gap:4px; }
.vecthumb { width:52px; height:52px; padding:2px; border:1px solid var(--line); background:#fff; cursor:pointer; }
.vecthumb img { width:100%; height:100%; object-fit:contain; }

.vecprev img { cursor:zoom-in; }
.vecbigbox { background:#fff; width:min(1400px, 96vw); max-height:92vh; overflow:auto; padding:16px; border-radius:4px; }
.vecbiggrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:12px; align-items:start; margin:10px 0; }
.vecbigcol { background:repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; border:1px solid var(--line); padding:6px; }
.vecbigcol img { display:block; max-width:100%; margin-top:6px; }

/* ekip: vektöre çevirme tuvalin sağında (tabelalar çoğunlukla dik, sağ taraf boş kalıyordu) */
:root { --rpanel-w: clamp(190px, 13vw, 210px); }   /* dar: önizlemeye basınca zaten büyüyor */
body.has-rpanel .layout { grid-template-columns: 340px 6px 1fr var(--rpanel-w); }
.rpanel { overflow-y:auto; padding:10px 8px; background:#fff; border-left:1px solid var(--line); }
.rpanel .vecbox { border-top:none; }
.rpanel .vecprev img { max-height:180px; }
.rpanel h3 { font-size:14px; }
.rpanel .vstep { padding:6px; }
.rpanel select { max-width:100%; }
.rpanel .row { flex-wrap:wrap; }

.stagebar button.eraseroff { background:#D96268; color:#fff; border-color:#D96268; font-weight:600; }
#eraser.on { background:#D96268; color:#fff; border-color:#D96268; }

.stagebar button.eraserbtn.on { background:#D96268; color:#fff; border-color:#D96268; font-weight:600; }

.veckind { padding:8px 10px; margin:6px 0; font-size:13px; border-radius:2px; }
.veckind.ok { background:#E7F6EA; border:1px solid #4CAF66; color:#1E6B34; }
.veckind.warn { background:#FFF1E0; border:1px solid #E08A2C; color:#8A4B00; }
.vecthumb.big { border-color:#4CAF66; box-shadow:0 0 0 1px #4CAF66; }

.dpiinfo { padding:6px 12px; margin-bottom:6px; font-size:13px; border-radius:2px; }
.dpiinfo.ok { background:#E7F6EA; color:#1E6B34; border:1px solid #4CAF66; }
.dpiinfo.mid { background:#FFF4D6; color:#7A5A00; border:1px solid #E0B84C; }
.dpiinfo.bad { background:#FDE7E7; color:#9B1C1C; border:1px solid #D96268; }

/* sağ panel: 3 adım */
.vstep { border:1px solid var(--line); border-radius:3px; padding:8px 10px; margin:8px 0; display:flex; flex-direction:column; gap:6px; }
.vstep > b { font-size:14px; color:var(--navy); }
button.wide { width:100%; text-align:left; padding:9px 12px; font-size:14px; }
button.wide small { font-weight:400; opacity:.8; }
.vecset summary { cursor:pointer; color:var(--navy); }

.substep { border-top:1px dashed var(--line); padding-top:6px; display:flex; flex-direction:column; gap:4px; }
.tag { display:inline-block; font-size:11px; font-weight:600; padding:1px 6px; border-radius:2px; width:max-content; }
.tag.free { background:#E7F6EA; color:#1E6B34; }
.tag.paid { background:#FFF1E0; color:#8A4B00; }

/* şablonlar: "View all" penceresi (uzun listeyi kaydırmak yerine geniş ızgara) */
.panel h3 .tplall { float:right; font-family:system-ui, sans-serif; font-size:12px; border:1px solid var(--navy); background:#fff; color:var(--navy); padding:3px 8px; border-radius:2px; cursor:pointer; }
.tplbox { background:#fff; width:min(1200px, 96vw); max-height:92vh; overflow:auto; padding:16px; border-radius:4px; display:flex; flex-direction:column; gap:10px; }
.tplbox .tplgridbig { grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); }
.tplbox .tplgridbig .thumb { height:150px; }
@media (max-width:700px) { #tplDlg { justify-content:flex-start; } #tplDlg .tplbox { margin-left:8px; width:calc(100vw - 16px); }
  .tplbox .tplgridbig { grid-template-columns:repeat(auto-fill, minmax(100px, 1fr)); } .tplbox .tplgridbig .thumb { height:120px; } }
.panel .tplmore { grid-column:1 / -1; border:1px dashed var(--navy); background:#fff; color:var(--navy); padding:8px; font-size:13px; cursor:pointer; border-radius:2px; }
.tplzoom { position:fixed; z-index:80; background:#fff; padding:8px; border-radius:4px; box-shadow:0 8px 30px rgba(0,0,0,.25); text-align:center; font-size:13px; pointer-events:none; }
.tplzoom img { display:block; height:min(92vh - 30px, 816px); width:auto; margin-bottom:4px; }   /* 21 Kas: %70 büyük (480→816) */
.tplzoom.center { transform:translate(-50%, -50%); pointer-events:auto; }
.tplzoom.center img { max-width:calc(100vw - 40px); height:auto; max-height:70vh; }
.tplhint { margin:0; }

/* müşteri görseli bölümü kapalı başlar; sağ kenardaki dikey düğmeyle açılır */
.rpopen { position:fixed; right:0; top:50%; transform:translateY(-50%); z-index:20; writing-mode:vertical-rl; background:var(--navy); color:#fff;
  border:0; padding:14px 7px; border-radius:4px 0 0 4px; cursor:pointer; font-size:13px; box-shadow:0 2px 10px rgba(0,0,0,.2); }
.rpclose { float:right; border:1px solid var(--line); background:#fff; color:var(--navy); cursor:pointer; padding:0 6px; font-size:13px; }
.rpanel { position:fixed; right:0; top:52px; bottom:0; width:var(--rpanel-w); z-index:15; box-shadow:-4px 0 16px rgba(61,69,89,.15); }
body.rp-open .stage .stagebar, body.rp-open .stage .hint { position:relative; left:calc(var(--rpanel-w) / -2); }

/* ---------- telefon (≤800 px): üstte canlı tabela, altta sekmeler (Design · Text · Figures) + her zaman görünen Save ---------- */
.monly, .mtabs { display:none; }
@media (max-width:800px) {
  .monly { display:flex; }
  body { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
  .top { flex-wrap:wrap; gap:4px 8px; padding:6px 10px; }
  .top .brand { font-size:18px; }
  .top .brandlogo { height:30px; }
  .order { width:100%; display:flex; align-items:center; gap:6px; font-size:13px; }
  .order select { flex:1; min-width:0; max-width:none; padding:8px 6px; font-size:14px; }
  .linkbtn { min-height:44px; padding:0 4px; }
  .layout { display:flex; flex-direction:column; flex:1; min-height:0; height:auto; }
  .splitter, .rpopen, .rpanel, .stage .hint, .zoom, .centerToggle, .stagebar #sizeLabel, #eraserOff, #licToggle,
  .fabricrow, #save, #saveTpl, #tplAll, .panel .tplmore, #noSel, #txt, .dtip, #lockRow { display:none !important; }
  .stage { order:1; flex:none; padding:4px 0 2px; overflow:hidden; align-items:center; }
  .stagebar { order:0; flex-wrap:nowrap; justify-content:space-between; gap:6px; padding:0 8px; margin-bottom:4px; max-width:none; }
  .stagebar button { min-height:44px; padding:4px 10px; font-size:14px; white-space:nowrap; }
  .stagebar #mFree.on { background:#2F6FD6; border-color:#2F6FD6; color:#fff; }
  .notice, .warn, .dpiinfo { margin:2px 8px; font-size:12px; padding:5px 8px; }
  .actions { margin-top:2px; min-height:18px; }
  .panel { order:2; flex:1; min-height:0; border-right:0; border-top:1px solid var(--line); padding:10px 12px 16px; }
  .panel section { display:none; }
  body[data-mtab="design"] .panel section[data-mtab="design"],
  body[data-mtab="text"] .panel section[data-mtab="text"],
  body[data-mtab="figures"] .panel section[data-mtab="figures"] { display:block; }
  .panel h3 { font-size:15px; }
  .chips { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; }
  .chips button, .row button, button.ghost { min-height:44px; font-size:14px; flex:none; }
  .row { flex-wrap:wrap; }
  .row button { flex:1 1 auto; }
  .panel .list { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .panel .list .thumb { height:120px; }
  .panel .list button { font-size:12px; }
  #mNext { width:100%; min-height:48px; margin-top:10px; justify-content:center; font-size:15px; }
  .mfields { flex-direction:column; gap:10px; }
  .mfield label { display:block; font-size:12px; color:#6A7185; margin:0 0 2px; }
  .mfield textarea { width:100%; font-size:16px; padding:10px; border:1px solid var(--line); border-radius:3px; margin:0; font-family:inherit; resize:vertical; }
  .mfield.on textarea { border-color:var(--navy); box-shadow:0 0 0 1px var(--navy); }
  .mfield #selTools { border:1px solid var(--line); border-top:0; padding:6px 8px; background:var(--paper); }
  #mFigSel { display:block; }
  #mFigSel #selTools { border:1px solid var(--navy); padding:6px 8px; margin-bottom:10px; background:var(--sky); }
  #selTools .fontbox, #selTools .colorbox { display:none; }
  #selTools[data-open="font"] .fontbox:not([hidden]), #selTools[data-open="color"] .colorbox { display:block; }
  .mstyle button.on { background:var(--navy); color:#fff; }
  .flist { max-height:220px; grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .fopt { min-height:48px; font-size:20px; }
  .swatches button { width:36px; height:36px; }
  .swatches input[type=color] { width:40px; height:36px; }
  .panel .icons { grid-template-columns:repeat(5, minmax(0, 1fr)); }
  .icons button { min-height:52px; }
  .mtabs { display:grid; grid-template-columns:1fr 1fr 1fr 1.2fr; flex:none; background:#fff; border-top:1px solid var(--line);
    padding-bottom:env(safe-area-inset-bottom); }
  .mtabs button { min-height:52px; border:0; background:#fff; color:var(--navy); font-size:15px; cursor:pointer; }
  .mtabs button.on { color:var(--coral); font-weight:700; box-shadow:inset 0 3px 0 var(--coral); }
  .mtabs .msave { background:var(--navy); color:#fff; font-weight:700; }
  .mtabs .msave:disabled { opacity:.4; }
  .mprev { flex-direction:column; align-items:stretch; justify-content:flex-start; background:var(--paper); }
  .mprevbar { display:flex; gap:8px; padding:8px; background:#fff; border-bottom:1px solid var(--line); }
  .mprevbar button { min-width:48px; min-height:44px; border:1px solid var(--navy); background:#fff; color:var(--navy); font-size:20px; border-radius:2px; }
  .mprevbar #mPrevClose { font-size:15px; }
  .mprevimg { flex:1; min-height:0; overflow:auto; padding:10px; text-align:center; }
  .mprevimg img { height:100%; width:auto; max-width:none; box-shadow:0 4px 18px rgba(61,69,89,.18); }
  .mprev #mPrevSave { margin:8px; min-height:50px; font-size:16px; }
  .gatebox { padding:20px; }
  .gatebox button { min-height:46px; }
  #tplDlg .tplbox button { min-height:44px; }
}
/* telefon, dik tabela: Free edit / Preview solda, Undo / Redo sağda — tabelanın yanındaki boş gri alanın üstünde */
@media (max-width:800px) {
  .stage { position:relative; }
  body:not(.m-wide) .stagebar { position:absolute; top:28px; left:6px; right:6px; width:auto; max-width:none; z-index:2; display:grid; grid-template-columns:auto 1fr auto;
    gap:8px 0; padding:0; margin:0; pointer-events:none; }
  body:not(.m-wide) .stagebar > * { pointer-events:auto; }
  body:not(.m-wide) .stagebar #mFree { grid-column:1; grid-row:1; }
  body:not(.m-wide) .stagebar #mPreview { grid-column:1; grid-row:2; }
  body:not(.m-wide) .stagebar > span:last-child { grid-column:3; grid-row:1 / span 2; display:flex; flex-direction:column; gap:8px; }
  body:not(.m-wide) .stagebar button { width:96px; font-size:13px; padding:4px 6px; box-shadow:0 1px 4px rgba(61,69,89,.18); }
  .stagebar button:disabled { background:#f3f3f3; }
}
/* telefon: Select all / Fit sol sütunda; alt paneli gizleyen tutamak; parmakla yakınlaştırma sayfayı büyütmesin */
@media (max-width:800px) {
  body:not(.m-wide) .stagebar #mAll { grid-column:1; grid-row:3; }
  body:not(.m-wide) .stagebar #mArea { grid-column:1; grid-row:4; }
  body:not(.m-wide) .stagebar #mFit { grid-column:1; grid-row:5; }
  .stagebar #mArea.on { background:#2F6FD6; border-color:#2F6FD6; color:#fff; }
  .canvasWrap, .canvasWrap canvas { touch-action:none; }
  .mhandle { width:100%; min-height:44px; justify-content:center; align-items:center; border:0; border-top:1px solid var(--line);
    background:#fff; color:var(--navy); font-size:14px; font-weight:600; cursor:pointer; }
  body.m-big .panel { display:none; }
}
/* telefon, büyük tabela modu: yan düğmeler sadece simge (tabelanın üstüne binmesin) */
@media (max-width:800px) {
  body.m-big:not(.m-wide) .stagebar button { width:44px; padding:0; font-size:20px; }
  body.m-big .stagebar .lb { display:none; }
}
/* telefon: uyarılar tuvalin altına biner (yer kaplayıp alt sekmeleri ekrandan itmesin); bilgi notu dokununca kapanır */
@media (max-width:800px) {
  .stage .notice, .stage .warn, .stage .dpiinfo { position:absolute; left:8px; right:8px; bottom:70px; z-index:3; margin:0; }
}
#iconCats button.drop { background:var(--coral); color:#fff; border-color:var(--coral); }

/* otomatik doldurma (ekip, deneme) */
.afbox { border:1px solid #c9d3e6; background:#f4f7fc; border-radius:6px; padding:8px; margin:6px 0 10px; }
.afbox textarea { width:100%; box-sizing:border-box; margin:4px 0; }
.afbox #afOut div { margin-top:4px; }

/* kavis (ekip) */
.curverow { align-items:center; gap:6px; }
.curverow input[type=range] { flex:1; min-width:120px; }
.curverow .numval { width:58px; text-align:right; font-variant-numeric:tabular-nums; padding:2px 4px; }

/* masaüstü Canva düzeni (21 Kas): solda simge şeridi + açılır çekmece, tuvalin üstünde seçime göre araç çubuğu */
.rail, .ctxbar { display:none; }
@media (min-width:801px) {
  .layout { grid-template-columns:72px var(--drawer-w, 340px) 6px minmax(0, 1fr); grid-template-rows:minmax(0, 1fr); grid-template-areas:"rail panel sp stage"; }
  .rail { grid-area:rail; display:flex; flex-direction:column; gap:4px; padding:8px 6px; background:#fff; border-right:1px solid var(--line); }
  .rail button { display:flex; flex-direction:column; align-items:center; gap:3px; border:0; background:none; color:var(--navy); padding:9px 2px;
    border-radius:8px; cursor:pointer; font-size:11.5px; }
  .rail button b { font-size:20px; line-height:1; }
  .rail button:hover { background:var(--sky); }
  .rail button.on { background:var(--blush); color:var(--coral); font-weight:600; }
  .rail .rpopen { position:static; transform:none; writing-mode:horizontal-tb; box-shadow:none; color:var(--navy); background:none; border-radius:8px; padding:9px 2px; font-size:11.5px; }
  .panel .vecbox { border-top:none; } .panel .vecbox .row { flex-wrap:wrap; }
  .panel { grid-area:panel; } .splitter { grid-area:sp; } .stage { grid-area:stage; }
  .panel section { display:none; }
  body[data-mtab="design"] .panel section[data-mtab="design"],
  body[data-mtab="text"] .panel section[data-mtab="text"],
  body[data-mtab="figures"] .panel section[data-mtab="figures"],
  body[data-mtab="stripes"] .panel section[data-mtab="stripes"],
  body[data-mtab="tools"] .panel section[data-mtab="tools"],
  body[data-mtab="upload"] .panel section[data-mtab="upload"] { display:block; }
  body.drawer-closed .layout { grid-template-columns:72px 0 0 minmax(0, 1fr); }
  body.drawer-closed .panel, body.drawer-closed .splitter { display:none; }
  .ctxbar { position:relative; z-index:20; display:flex; align-items:center; gap:6px; flex-wrap:wrap; align-self:center; min-height:46px; max-width:100%; padding:4px 10px;
    margin-bottom:8px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 2px 8px rgba(61,69,89,.08); }
  .ctxbar .ctxtools { display:none; align-items:center; gap:6px; flex-wrap:wrap; }
  .ctxbar.sel .ctxtools { display:flex; }
  .ctxbar.sel .ctxhint { display:none; }
  .ctxbar .row { margin:0; }
  .ctxbar button { border:1px solid var(--navy); background:#fff; color:var(--navy); padding:5px 10px; border-radius:2px; cursor:pointer; font-size:13px; }
  .ctxdrop { position:relative; }
  .ctxpop { position:absolute; top:calc(100% + 6px); left:0; z-index:30; width:300px; background:#fff; border:1px solid var(--line); border-radius:8px;
    padding:8px 10px; box-shadow:0 8px 24px rgba(61,69,89,.18); }
  .ctxpop .colorbox { margin:0; }
  /* Canva tarzı araçlar (21 Kas) */
  .ctxbar .ctxfont { min-width:150px; max-width:220px; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
  .ctxsize { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; overflow:hidden; }
  .ctxbar .ctxsize button { border:0; border-radius:0; padding:5px 10px; background:none; }
  .ctxsize input { width:52px; border:0; border-inline:1px solid var(--line); text-align:center; font:inherit; font-size:13px; padding:5px 2px; -moz-appearance:textfield; }
  .ctxsize input::-webkit-inner-spin-button { display:none; }
  .ctxseg { display:inline-flex; gap:2px; }
  .ctxbar .ctxseg button { padding:5px 8px; }
  .ctxbar .ctxseg button.on { background:var(--blush); color:var(--coral); border-color:var(--coral); }
  .cdot { display:inline-block; width:18px; height:18px; border-radius:50%; border:1px solid rgba(0,0,0,.2); vertical-align:middle; }
  .poppos p { margin:8px 0 4px; } .poppos p:first-child { margin-top:0; }
  .posgrid { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
  .posgrid.two { grid-template-columns:1fr 1fr; }
  .ctxbar .posgrid button { padding:6px 4px; font-size:12.5px; }
  .poppos input[type=range] { width:100%; }
  .cmenu { position:fixed; z-index:100; min-width:200px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:5px;
    box-shadow:0 10px 30px rgba(0,0,0,.18); }
  .cmenu button { display:flex; justify-content:space-between; gap:16px; width:100%; border:0; background:none; color:var(--navy); padding:7px 10px;
    border-radius:8px; font:inherit; font-size:13.5px; cursor:pointer; text-align:left; }
  .cmenu button:hover:not(:disabled) { background:var(--sky); }
  .cmenu button:disabled { opacity:.4; cursor:default; }
  .cmenu kbd { font:inherit; font-size:12px; color:#888; }
  .cmenu hr { border:0; border-top:1px solid var(--line); margin:4px 2px; }
}
.cmenu[hidden] { display:none !important; }

/* WT görünümü: sade, Apple tarzı (21 Kas, kullanıcı seçti). Happy kendi temasında kalır (body.theme-happy). */
body:not(.theme-happy) { --navy:#1d1d1f; --coral:#0071e3; --blush:#e8f0fe; --sky:#f0f0f3; --paper:#f5f5f7; --line:#e3e3e8; --red:#d70015;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif; -webkit-font-smoothing:antialiased; letter-spacing:-.005em; }
body:not(.theme-happy) :is(.top strong, .panel h3, .adm h2, .tplcat, .gatebox h2, .stagebar #sizeLabel) { font-family:inherit; font-weight:600; letter-spacing:-.015em; }
body:not(.theme-happy) .top { background:rgba(255,255,255,.75); position:relative; z-index:45; backdrop-filter:saturate(180%) blur(18px); -webkit-backdrop-filter:saturate(180%) blur(18px); }
body:not(.theme-happy) .panel { background:#fbfbfd; }
body:not(.theme-happy) .panel h3 { font-size:15px; }
/* düğmeler: hap biçimi, ince gri çerçeve, mavi ana düğme */
body:not(.theme-happy) :is(.chips button, .row button, button.ghost, .stagebar button, .ctxbar button, .panel h3 .tplall) {
  border:1px solid var(--line); background:#fff; color:var(--navy); border-radius:999px; transition:background .15s, border-color .15s; }
body:not(.theme-happy) :is(.chips button, .row button, button.ghost, .stagebar button, .ctxbar button):hover { background:#f5f5f7; border-color:#d2d2d7; }
body:not(.theme-happy) .chips button.on { background:var(--coral); border-color:var(--coral); color:#fff; }
body:not(.theme-happy) button.primary { background:var(--coral); border-radius:999px; padding:10px 22px; font-weight:600; }
body:not(.theme-happy) button.primary:hover { background:#0077ed; }
/* kartlar, kutular, alanlar: yuvarlak köşe + hafif gölge */
body:not(.theme-happy) :is(.list button, .icons button) { border-radius:12px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.06); }
body:not(.theme-happy) .list button.on { border-color:var(--coral); background:#fff; box-shadow:0 0 0 2px var(--coral); }
body:not(.theme-happy) :is(.tools textarea, .tools select, .order input, .adm input, .adm select, .mfield textarea) { border-radius:10px; background:#f5f5f7; border-color:transparent; }
body:not(.theme-happy) :is(.tools textarea, .tools select, .order input):focus { outline:none; background:#fff; box-shadow:0 0 0 3px rgba(0,113,227,.25); }
body:not(.theme-happy) .adm section { border-radius:16px; border-color:transparent; box-shadow:0 1px 3px rgba(0,0,0,.06); }
body:not(.theme-happy) .canvasWrap { box-shadow:0 12px 40px rgba(0,0,0,.12); }
body:not(.theme-happy) :is(.ctxbar, .ctxpop) { border-radius:14px; background:rgba(255,255,255,.9); backdrop-filter:blur(14px); box-shadow:0 4px 20px rgba(0,0,0,.08); }
body:not(.theme-happy) .rail { background:#fbfbfd; }
body:not(.theme-happy) .rail button { border-radius:12px; }
/* uyarılar mavi değil kırmızı kalsın */
body:not(.theme-happy) .warn { background:var(--red); border-radius:10px; }
body:not(.theme-happy) :is(.warnTxt, .gatebox .err) { color:var(--red); }
@media (max-width:800px) { body:not(.theme-happy) .stage .stagebar button { border-radius:12px; } body:not(.theme-happy) .mtabs .msave { background:var(--coral); } }
/* kumaş seçimi + alt düğmeler de yuvarlak (21 Kas) */
body:not(.theme-happy) .fabrics .fab { border-radius:999px; padding:5px 11px 5px 6px; }
body:not(.theme-happy) .fabrics .fab span { border-radius:50%; width:16px; height:16px; border-color:rgba(0,0,0,.18); }
body:not(.theme-happy) .fabrics .fab.on { border-color:var(--coral); box-shadow:0 0 0 1px var(--coral); }
body:not(.theme-happy) .actions button:not(.primary) { border:1px solid var(--line); background:#fff; color:var(--navy); border-radius:999px; padding:9px 18px; cursor:pointer; font-size:14px; }
body:not(.theme-happy) .actions button:not(.primary):hover { background:#f5f5f7; }
body:not(.theme-happy) .lictoggle { border-radius:999px; }

/* çok renkli figürde her renk ayrı nokta (Canva gibi) */
.ctxcolors { display:inline-flex; gap:4px; align-items:center; }
.ctxcolors:empty { display:none; }
.ctxcolors .cdot { width:22px; height:22px; border-radius:50%; cursor:pointer; box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); position:relative; }
.ctxcolors input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }

/* seçim üstü küçük çubuk + sağ altta yakınlaştırma (Canva, 21 Kas; sadece masaüstü) */
.selbar { position:fixed; z-index:40; display:flex; gap:2px; padding:3px; background:#fff; border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,.18); }
.selbar[hidden] { display:none; }
.selbar button { border:0; background:none; width:32px; height:30px; border-radius:6px; cursor:pointer; font-size:16px; color:var(--navy); }
.selbar button:hover { background:var(--sky); }
#zoomRange { display:none; }
@media (max-width:800px) { .selbar { display:none !important; } }
@media (min-width:801px) {
  .stage .zoom { display:flex; align-items:center; gap:2px; margin-left:auto; background:#fff; border-radius:999px; padding:3px 10px; box-shadow:0 1px 6px rgba(0,0,0,.12); font-size:13px; }
  .stage .zoom button { border:0; background:none; min-width:28px; padding:2px 6px; }
  #zoomRange { display:block; width:70px; accent-color:var(--coral); }
  /* 21 Kas: tuval büyük olsun — ölçü gri alanın köşesinde, kumaş + kaydet + yakınlaştırma altta tek satır (editor.js taşır) */
  .canvasWrap { position:relative; }
  .canvasWrap #sizeLabel { position:absolute; top:6px; left:8px; z-index:2; pointer-events:none; font-size:12px; font-weight:600;
    color:rgba(0,0,0,.6); background:rgba(255,255,255,.65); padding:2px 8px; border-radius:6px; }
  .stage .hint { display:none; }
  .botbar { display:flex; align-items:center; gap:6px 10px; flex-wrap:wrap; align-self:stretch; margin-top:8px; }
  .botbar .fabricrow, .botbar .actions { margin-top:0; }
  .botbar .actions { gap:8px; flex:none; } .botbar .zoom { flex:none; } .botbar .fabricrow { flex:1 1 320px; min-width:320px; gap:5px; } .botbar .fabrics { gap:4px; } .botbar .fabrics .fab { padding:3px 7px; }   /* dar ekranda kumaşlar kendi içinde alt satıra geçer */
  .botbar .actions button { padding:6px 14px !important; font-size:13px !important; }
}

/* sayfa şeridi (siparişin tabelaları; 21 Kas, sadece masaüstü) */
.pages { display:flex; gap:10px; margin-top:10px; overflow-x:auto; max-width:100%; padding:4px 2px; align-self:center; }
.pages[hidden] { display:none; }
.pages .page { position:relative; flex:none; width:84px; height:118px; padding:4px; border:2px solid var(--line); border-radius:8px; background:#fff; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:2px; }
.pages .page.on { border-color:var(--coral); box-shadow:0 0 0 2px var(--blush); }
.pages .page img, .pages .page > span { width:100%; height:78px; object-fit:contain; background:#f6f6f6; border-radius:4px; }
.pages .page b { position:absolute; top:6px; left:8px; font-size:12px; background:rgba(255,255,255,.85); border-radius:4px; padding:0 4px; color:var(--navy); }
.pages .page i { position:absolute; top:6px; right:8px; font-size:11px; font-style:normal; background:var(--coral); color:#fff; border-radius:4px; padding:0 4px; }
.pages .page small { font-size:10px; line-height:1.15; color:#666; text-align:center; overflow:hidden; max-height:24px; }
/* 22 Kas: masaüstünde üst çubuk tek satır (Geri al/Yinele alta düşmesin) */
@media (min-width:801px) { .stagebar { max-width:none; width:auto; flex-wrap:nowrap; gap:8px; } .stagebar button { white-space:nowrap; } .stagebar > span:last-child { display:flex; gap:4px; flex-shrink:0; } }
.flist .fhead { grid-column:1/-1; font:600 12px sans-serif; color:#86868b; margin:8px 0 2px; text-transform:uppercase; letter-spacing:.04em; }

/* 25 Kas: "Sıfırdan başla" bant yerine tuvalin sol üst köşesinde; kumaşlar tek satır (yana kayar); ekip katman paneli sağ üstte */
.canvasWrap { position:relative; }
.startover { position:absolute; top:34px; left:8px; z-index:3; font-size:12px; padding:3px 10px; border-radius:999px; cursor:pointer;
  border:1px solid #f0b8bb; background:#fff1f2; color:#b4232f; box-shadow:0 1px 4px rgba(0,0,0,.1); }
.startover:hover { background:#D96268; color:#fff; }
.startover[hidden], .layers[hidden] { display:none; }
@media (min-width:801px) {
  .botbar { flex-wrap:nowrap; }
  .botbar .fabricrow { flex:1 1 0; min-width:0; flex-wrap:nowrap; }
  .botbar .fabrics { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; padding-bottom:2px; }
  .botbar .fabrics .fab { flex:none; white-space:nowrap; }
}
.layers { position:absolute; top:8px; right:8px; z-index:3; width:250px; max-height:calc(100% - 16px); display:flex; flex-direction:column;
  background:rgba(255,255,255,.96); border:1px solid #d9d4e8; border-radius:12px; box-shadow:0 4px 18px rgba(61,69,89,.18); font-size:12px; overflow:hidden; }
.layers .lhead { padding:7px 12px; font-weight:700; color:#fff; background:linear-gradient(90deg,#6c5ce7,#a66cff); cursor:pointer; display:flex; justify-content:space-between; }
.layers.shut .llist { display:none; } .layers.shut .lhead span { transform:rotate(-90deg); }
.layers .llist { overflow-y:auto; padding:4px; }
.layers .lyr { display:flex; align-items:center; gap:2px; padding:3px 4px; border-radius:8px; cursor:pointer; flex-wrap:wrap; }
.layers .lyr:hover { background:#f2effc; } .layers .lyr.on { background:#e6e0ff; box-shadow:inset 3px 0 0 #6c5ce7; }
.layers .lyr.off .lname { opacity:.4; text-decoration:line-through; }
.layers .lyr.ref { background:#fff7e0; border:1px dashed #e0a800; }
.layers .lname { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#2d2d3a; }
.layers .lyr button { border:0; background:none; padding:1px 3px; font-size:12px; cursor:pointer; border-radius:5px; }
.layers .lyr button:hover { background:#fff; }
.layers .lop { flex-basis:100%; display:flex; align-items:center; gap:6px; color:#8a6d00; padding:2px 2px 0; }
.layers .lop input { flex:1; accent-color:#e0a800; }
.layers .lempty { margin:6px; color:#777; line-height:1.4; }
.tplDel { font-size:11px; color:#c0392b; padding:1px 6px; border-radius:4px; cursor:pointer; }
.tplDel:hover { background:#c0392b; color:#fff; }

/* Çizgili zemin (ekip, stripes.js) */
.stripebox { border:1px solid #E3D4DA; background:#FBF6F8; border-radius:8px; padding:8px 10px; margin:8px 0; }
.stripebox h4 { margin:0 0 6px; font-size:14px; color:var(--navy); }
.stripebox .sgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:6px 10px; }
.stripebox .sgrid label > select, .stripebox .sgrid label > input { width:100%; min-width:0; box-sizing:border-box; }
.stripebox .sgrid label.sw, .stripebox .sgrid label.sgap { flex-direction:column; align-items:stretch; }
.stripebox .sgrid label { display:flex; flex-direction:column; font-size:12px; gap:2px; }
.stripebox .sgrid label.wide { grid-column:1 / -1; }
.stripebox .sgrid label[hidden], .stripebox input[hidden] { display:none; }
.stripebox select, .stripebox input[type=number] { padding:3px 4px; font-size:13px; }
.stripebox .scol { display:flex; gap:6px; } .stripebox .scol input { width:44px; height:28px; padding:0; border:1px solid #ccc; }
.stripebox .srow { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 4px; }
.stripebox .srow button { border:1px solid var(--navy); background:#fff; color:var(--navy); padding:6px 9px; border-radius:6px; cursor:pointer; font-size:13px; }
.stripebox .srow button.sgo { background:#2E9E5B; border-color:#2E9E5B; color:#fff; font-weight:600; }

/* ölçü grupları: üstte grup düğmeleri, altında o grubun ölçüleri */
.sizegroups { display:flex; flex-wrap:wrap; gap:6px; width:100%; padding-bottom:8px; margin-bottom:2px; border-bottom:1px solid #e5e5ea; }
.sizegroups button { font-weight:600; border-radius:16px !important; }
.sizegroups button.on { background:var(--navy) !important; border-color:var(--navy) !important; color:#fff !important; }

/* şekiller (29 Kas) */
.shapebtns { display:flex; align-items:center; gap:6px; margin:6px 0 10px; flex-wrap:wrap; }
.shapebtns button { width:38px; height:38px; font-size:20px; line-height:1; border-radius:10px; border:1px solid var(--line); background:#fff; color:#5A3A47; cursor:pointer; }
.shapebtns button:hover { background:#f6eef0; border-color:#C98B8F; }
.shaperow .row > span:first-child { width:58px; }
.ctxpop.popshape { left:auto; right:0; }
.shaperow input[type=range] { min-width:70px; }
.shaperow input[type=color] { flex:none; width:34px; height:28px; padding:0; border:1px solid var(--line); border-radius:6px; background:none; }

/* 30 Kas: çalışma alanı ekranı doldurur, araçlar alanın içinde (editor.js taşır; sadece masaüstü) */
@media (min-width:801px) {
  body[data-mtab="save"] .panel section[data-mtab="save"] { display:block; }
  #saveSec .actions { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:0; }
  #saveSec .actions button { width:100%; padding:11px 14px !important; border-radius:12px !important; font-size:14px !important; font-weight:600; cursor:pointer; }
  #saveSec #saveTpl, #saveSec #save { background:linear-gradient(90deg,#D96268,#e88a7a); color:#fff; border:0; }
  #saveSec #saveTplNew { background:#eef6ff !important; border:1px solid #9cc3f0 !important; color:#1d5fa8 !important; }
  #saveSec #exportPng { background:#effaf1 !important; border:1px solid #8fd19e !important; color:#1e7a35 !important; }
  #saveSec #versions { background:#f6f1ff !important; border:1px solid #c6b5f0 !important; color:#5b3fb0 !important; }
  .toptools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-left:14px; }
  .toptools button { border:1px solid #d2d2d7; background:#fff; color:var(--navy); padding:5px 12px; border-radius:999px; cursor:pointer; font-size:13px; white-space:nowrap; }
  .toptools button:hover { background:#f5f5f7; } .toptools button:disabled { opacity:.35; cursor:default; }
  .toptools #centerToggle { background:#eef6ff; border-color:#9cc3f0; color:#1d5fa8; }
  .toptools #eraserOff { background:#fff1f2; border-color:#f0b8bb; color:#b4232f; }
  .toptools #eraserOff.on, .toptools #eraserOff.eraseroff { background:#D96268; color:#fff; border-color:#D96268; }
  .toptools #licToggle { background:#fff8e6; border-color:#f0d48a; color:#8a6400; }
  .toptools #custView { background:#effaf1; border-color:#8fd19e; color:#1e7a35; }
  .toptools > span { display:flex; gap:4px; }
  .toptools > span button { background:#f6f1ff; border-color:#c6b5f0; color:#5b3fb0; }
  .stage .canvasWrap .zoom { position:absolute; top:8px; left:8px; z-index:3; margin:0; }
  .startover { top:46px; }
  .wrapbc { position:absolute; left:50%; bottom:8px; transform:translateX(-50%); z-index:3; display:flex; flex-direction:column; align-items:center; gap:4px; max-width:calc(100% - 340px); }
  .wrapbc .fabricrow { margin:0; display:flex; align-items:center; gap:6px; max-width:100%; flex-wrap:nowrap; background:rgba(255,255,255,.92); border-radius:999px; padding:4px 10px; box-shadow:0 1px 6px rgba(0,0,0,.12); }
  .wrapbc .fabricrow[hidden] { display:none; }
  .wrapbc .fabrics { display:flex; gap:4px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; }
  .wrapbc .fabrics .fab { flex:none; white-space:nowrap; padding:3px 7px; }
  .wrapbr { position:absolute; right:8px; bottom:8px; z-index:3; display:flex; flex-direction:column; align-items:flex-end; gap:5px; max-width:300px; pointer-events:none; }
  .wrapbr > * { pointer-events:auto; }
  .wrapbr .warn { margin:0; font-size:12px; padding:6px 10px; box-shadow:0 2px 8px rgba(0,0,0,.15); }
  .wrapbr .warn[hidden], .wrapbr #status:empty { display:none; }
  .wrapbr #status { background:rgba(255,255,255,.9); border-radius:8px; padding:2px 8px; }
  .canvasWrap .wrapbr #sizeLabel { position:static; font-size:12px; font-weight:600; color:rgba(0,0,0,.6); background:rgba(255,255,255,.75); padding:2px 8px; border-radius:6px; pointer-events:none; }
  .wrapbr .actions { display:flex; gap:6px; margin:0; } .wrapbr .actions #status { display:none; }
}
/* Konumlandır (Canva gibi): Düzenle + Katmanlar sekmeleri */
.layers { width:272px; }
.layers .ltabs { display:flex; gap:4px; padding:6px 6px 0; }
.layers .ltabs button { flex:1; border:0; padding:6px; border-radius:8px 8px 0 0; background:#f2effc; color:#6c5ce7; font-weight:700; cursor:pointer; }
.layers .ltabs button.on { background:#6c5ce7; color:#fff; }
.layers.shut .ltabs, .layers.shut .arrbox { display:none; }
.layers[data-lt="arr"] .llist, .layers[data-lt="lyr"] .arrbox { display:none; }
.layers .arrbox { padding:8px; overflow-y:auto; border-top:2px solid #6c5ce7; }
.layers .asub { display:block; margin:8px 0 4px; color:#2d2d3a; font-size:12px; }
.layers .agrid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.layers .agrid button { border:1px solid #ddd6ff; background:#fff; border-radius:8px; padding:6px; cursor:pointer; text-align:left; font-size:12px; }
.layers .agrid button:hover { background:#6c5ce7; color:#fff; border-color:#6c5ce7; }
.layers .anum { display:grid; grid-template-columns:1fr 1fr 1fr; gap:5px; }
.layers .anum label { display:flex; flex-direction:column; font-size:11px; color:#666; gap:2px; }
.layers .anum input { width:100%; box-sizing:border-box; border:1px solid #ddd6ff; border-radius:7px; padding:5px; }
.layers .llist { border-top:2px solid #6c5ce7; }
.layers .lyr { background:#f6f5fa; margin-bottom:4px; min-height:38px; }
.layers .lgrip { cursor:grab; color:#999; padding:0 4px; font-size:16px; }
.layers .lname img { max-height:30px; max-width:150px; display:block; margin:auto; }
.layers .lyr.drag { opacity:.4; } .layers .lyr.over { box-shadow:inset 0 3px 0 #6c5ce7; }

/* 30 Kas: Canva başlığı — Yeniden boyutlandır + sağ üstte Paylaş (ekipte kaydet/indir seçenekleri içinde) */
.hdbtn{background:rgba(255,255,255,.15);color:inherit;border:0;border-radius:8px;padding:6px 10px;font-weight:600;cursor:pointer}
.hdbtn:hover{background:rgba(255,255,255,.28)}
#rotSlot button{background:rgba(255,255,255,.15);color:inherit;border:0;border-radius:8px;padding:6px 10px;font-weight:600;cursor:pointer;margin:0}
#rotSlot button:hover{background:rgba(255,255,255,.28)}
header.top .share{position:relative;margin-left:8px}
.sharebtn{background:#fff;color:#3b2a6b;border:0;border-radius:8px;padding:7px 16px;font-weight:700;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.sharepop{position:absolute;right:0;top:calc(100% + 8px);z-index:60;background:#fff;color:#222;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.22);padding:12px;display:flex;flex-direction:column;gap:6px;min-width:250px}
.sharepop[hidden]{display:none}
.sharepop::before{content:"Kaydet ve indir";font-weight:700;font-size:13px;color:#555;margin-bottom:2px}
.sharepop button{width:100%;text-align:left}
.sharepop #status{display:none}

/* 30 Kas: çekmece kapatma tutamağı (Canva'daki "‹") */
.splitter{position:relative}
.drawerclose{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:30;width:22px;height:56px;border:1px solid var(--line);border-radius:0 10px 10px 0;background:#fff;color:#555;font-size:20px;line-height:1;cursor:pointer;box-shadow:2px 0 6px rgba(0,0,0,.12);padding:0}
.drawerclose:hover{background:#f3eefc;color:#6b3fd6}
@media (max-width:800px){.drawerclose{display:none}}

/* 30 Kas: Canva çubuğundaki B I U S */
.ctxbius button{min-width:28px;font-family:Georgia,serif;font-size:15px}
.ctxbius button.on{background:#ede5fb;color:#6b3fd6}
/* 30 Kas: Araçlar bölümü (seç, kalem, çizgi, yazı, tablo) */
.toolgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 12px}
.toolgrid button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;border:1px solid #e3dcef;border-radius:10px;background:#fff;font-size:12px;cursor:pointer}
.toolgrid button b{font-size:20px;line-height:1;color:#6b3fd6}
.toolgrid button:hover{background:#f6f1fd}
.toolgrid button.on{background:#ede5fb;border-color:#6b3fd6}
#penRow{display:flex;align-items:center;gap:8px;margin-bottom:10px}
#toolsSec .shapebtns{margin-top:4px}
.selcolrow { margin-top:10px; align-items:center; gap:8px; } .selcolrow input { width:44px; height:28px; padding:0; border:1px solid #ccc; }

/* Katmanlar: toplu seçim şeridi */
.layers .lyrbar { display:flex; align-items:center; gap:6px; padding:5px 6px; border-bottom:1px solid #ece8f6; background:#faf8ff; }
.layers .lyrbar label { display:flex; align-items:center; gap:4px; color:#4b4470; font-weight:600; cursor:pointer; }
.layers .lyrbar button { margin-left:auto; border:0; border-radius:8px; padding:4px 9px; font-weight:700; color:#fff; background:linear-gradient(90deg,#00a884,#26c6a0); cursor:pointer; }
.layers .lyrbar button:hover { filter:brightness(1.07); }
.layers[data-lt="arr"] .lyrbar, .layers.shut .lyrbar { display:none; }
.layers .lchk, .layers .lyrbar input { accent-color:#6c5ce7; margin:0 2px; cursor:pointer; }
