/*! RRD Graphics Studio — © 2026 Rusk Racing Designs (ruskracing.com). All rights reserved. No part of this software, its fonts, designs, logos or artwork may be copied, reused or redistributed without written permission. */
/* ==========================================================
   STUDIO.CSS — how the studios LOOK (colors, sizes, layout)
   Shared by Graphics Studio, Plate Studio and Seat Studio.

   How to read it: each rule is   what { how it looks }
     .name   = things with class="name" in index.html
     #name   = the one thing with id="name"
     [hidden] / .gone = hide it

   Easy changes:
     - Main colors are the --names in :root just below
       (--accent is the blue used for highlights).
     - The orange Save button is .btn.save (search "save").
   After changing this file, bump ?v= on studio.css in index.html
   so customers get the new look. No build step needed.
   ========================================================== */

/* ---------- color names used all over (dark Adobe-style theme) ----------
   --app background, --bar menu bar, --panel side panels, --text words,
   --dim grey words, --accent blue highlight, --sel picked layer row */
:root{
  --app:#1b1b1b; --bar:#2b2b2b; --panel:#303030; --panel-hd:#282828; --input:#1e1e1e;
  --border:#444; --border-soft:#3a3a3a; --text:#d6d6d6; --dim:#959595;
  --accent:#378ef0; --accent-h:#4b9cf5; --hover:#3c3c3c; --sel:#2d4f7c; --paste:#4a4a4a;
  --none:linear-gradient(to top right,#fff calc(50% - 1.5px),#e33 calc(50% - 1.5px),#e33 calc(50% + 1.5px),#fff calc(50% + 1.5px));
}

/* ---------- basics: page fills the window; 4 rows = menu bar, tool bar, work area, status bar ---------- */
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden}
body{background:var(--app);color:var(--text);font:12px/1.35 "Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  display:grid;grid-template-rows:32px 40px minmax(0,1fr) 24px;user-select:none}
button,input,select{font:inherit;color:inherit}
input,select{user-select:text}
svg.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;display:block}
[hidden]{display:none!important}

/* ---------- menu bar ---------- */
.menubar{display:flex;align-items:center;background:var(--bar);border-bottom:1px solid #111;padding:0 8px;gap:2px}
.logo{width:24px;height:24px;border-radius:4px;margin-right:8px;flex:none;display:block}
/* RRD logo = menu of the other studios */
.studios-menu{margin-right:6px}
.studios-menu>.logo-btn{display:flex;align-items:center;gap:2px;padding:3px 5px !important;cursor:pointer !important}
.studios-menu .logo{margin-right:0}
.studios-menu .caret{font-size:10px;color:var(--dim)}
#studiosList a{display:block;padding:7px 10px 7px 26px;border-radius:4px;color:inherit;text-decoration:none;position:relative}
#studiosList a small{display:block;color:var(--dim);font-size:11px;margin-top:1px}
#studiosList a:hover{background:var(--accent);color:#fff}
#studiosList a:hover small{color:#e2ecfc}
#studiosList a.here{pointer-events:none;opacity:.75}
#studiosList a.here::before{content:"✓";position:absolute;left:9px}
.menu{position:relative}
.menu>button{background:none;border:0;padding:5px 9px;border-radius:4px;cursor:default}
.menu>button:hover,.menu.open>button{background:var(--hover)}
.dropdown{display:none;position:absolute;top:100%;left:0;min-width:240px;background:#333;border:1px solid #4a4a4a;border-radius:6px;box-shadow:0 12px 32px rgba(0,0,0,.55);padding:4px;z-index:50}
.menu.open .dropdown{display:block}
.dropdown button{display:flex;width:100%;justify-content:space-between;align-items:center;gap:24px;background:none;border:0;padding:6px 10px 6px 26px;border-radius:4px;text-align:left;position:relative;cursor:default}
.dropdown button:hover{background:var(--accent);color:#fff}
.dropdown kbd{font:inherit;color:var(--dim)}
.dropdown button:hover kbd{color:#e2ecfc}
.dropdown button.check.on::before{content:"✓";position:absolute;left:9px}
.dropdown hr{border:0;border-top:1px solid #474747;margin:4px 6px}
.spacer{flex:1}
.doc-title{color:var(--dim);margin-right:12px;white-space:nowrap}
.btn{background:#3b3b3b;border:1px solid #4c4c4c;border-radius:5px;padding:4px 12px;cursor:pointer;white-space:nowrap}
.btn:hover{background:#464646}
.btn.blue{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;margin-left:6px}
.btn.blue:hover{background:var(--accent-h)}

/* ---------- top tool bar with color palette ---------- */
.optbar{display:flex;align-items:center;gap:4px;background:var(--panel);border-bottom:1px solid #151515;padding:0 10px;overflow-x:auto;white-space:nowrap}
.tool-name{display:flex;align-items:center;gap:6px;min-width:150px;font-weight:600}
.sep{width:1px;height:22px;background:var(--border);margin:0 8px;flex:none}
.ib{background:none;border:1px solid transparent;border-radius:4px;padding:4px;cursor:pointer;color:var(--text);flex:none;display:grid;place-items:center}
.ib:hover{background:var(--hover);border-color:var(--border)}
.ib.on{background:#4a4a4a;border-color:#555}
.ib:disabled{opacity:.35;pointer-events:none}
.lbl{color:var(--dim);margin-right:2px}
.palette{display:flex;align-items:center;flex:none;margin-left:6px}
.palette button{width:17px;height:24px;border:1px solid #111;border-left-width:0;padding:0;cursor:pointer;position:relative}
.palette button:first-child{border-left-width:1px;border-radius:3px 0 0 3px}
.palette button:last-child{border-radius:0 3px 3px 0}
.palette button:hover{transform:scale(1.3);z-index:2;border-width:1px;box-shadow:0 2px 6px rgba(0,0,0,.6)}
.palette .none{background:var(--none)}
.rainbow{width:22px;height:22px;border-radius:50%;background:conic-gradient(#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);box-shadow:inset 0 0 0 2px #303030,0 0 0 1px #111}

/* ---------- fill / outline indicator ---------- */
.fs{position:relative;width:34px;height:34px;flex:none}
.fs button{position:absolute;padding:0;cursor:pointer;border-radius:2px}
.fs .fs-fill{left:0;top:0;width:22px;height:22px;border:1px solid #000;box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);z-index:1}
.fs .fs-stroke{left:12px;top:12px;width:22px;height:22px;background:transparent;border:6px solid #000;box-shadow:0 0 0 1px #111,inset 0 0 0 1px #111}
.fs .on{z-index:3}
.fs .none{background:var(--none)!important;border-color:#fff!important}
.fs .fs-stroke.none{border-width:2px}

/* ---------- color picker pop-up ---------- */
.popover{position:fixed;z-index:60;width:256px;background:#333;border:1px solid #4a4a4a;border-radius:8px;box-shadow:0 14px 36px rgba(0,0,0,.55);padding:10px}
.pop-row{display:flex;gap:6px;align-items:center;margin-bottom:10px}
.seg{display:flex;background:var(--input);border:1px solid var(--border);border-radius:5px;padding:2px;flex:1}
.seg button{flex:1;background:none;border:0;border-radius:3px;padding:4px;cursor:pointer;color:var(--dim)}
.seg button.on{background:#4a4a4a;color:#fff}
.nonebtn{width:26px;height:26px;border:1px solid #111;border-radius:3px;background:var(--none);cursor:pointer;flex:none}
.sv{position:relative;height:150px;border-radius:3px;cursor:crosshair;touch-action:none;background:#f00}
.sv::before{content:"";position:absolute;inset:0;background:linear-gradient(to right,#fff,rgba(255,255,255,0));border-radius:inherit}
.sv::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,#000,rgba(0,0,0,0));border-radius:inherit}
.knob{position:absolute;width:12px;height:12px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(0,0,0,.4);transform:translate(-50%,-50%);pointer-events:none;z-index:1}
.hue{position:relative;height:12px;margin-top:10px;border-radius:6px;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);cursor:pointer;touch-action:none}
.hue .knob{top:50%}
.vals{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:5px;margin-top:10px}
.vals label{display:flex;flex-direction:column;gap:2px;color:var(--dim);font-size:10px}
.chips{display:grid;grid-template-columns:repeat(8,1fr);gap:4px}
.chips button{aspect-ratio:1;border:1px solid #111;border-radius:2px;padding:0;cursor:pointer}
.chips button:hover{outline:2px solid var(--accent);outline-offset:1px}

/* ---------- main layout ---------- */
/* 4 columns: tools (46px) | Libraries (236px) | drawing area | Properties + Layers (270px) */
main{display:grid;grid-template-columns:46px 236px minmax(0,1fr) 270px;min-height:0}
/* the tool buttons down the left edge; the small letter is its keyboard key */
.toolbar{background:var(--panel);border-right:1px solid #151515;display:flex;flex-direction:column;align-items:center;padding:8px 0;gap:3px}
.tool{width:34px;height:34px;display:grid;place-items:center;background:none;border:0;border-radius:5px;cursor:pointer;color:var(--text);position:relative}
.tool:hover{background:var(--hover)}
.tool.on{background:#505050;color:#fff}
.tool[data-key]::after{content:attr(data-key);position:absolute;right:2px;bottom:1px;font-size:8px;color:var(--dim)}

/* left and right panels; .pnl = one fold-up section with a header (.pnl-hd) and body (.pnl-bd) */
.side{background:var(--panel);overflow-y:auto;min-height:0}
.side.left{border-right:1px solid #151515}
.side.right{border-left:1px solid #151515}
.pnl{border-bottom:1px solid #1c1c1c}
.pnl-hd{display:flex;align-items:center;gap:7px;background:var(--panel-hd);padding:7px 10px;font-weight:600;cursor:pointer}
.pnl-hd::before{content:"";border:4px solid transparent;border-top-color:var(--dim);transform:translateY(2px);flex:none}
.pnl.collapsed .pnl-hd::before{transform:rotate(-90deg) translateX(-2px)}
.pnl.collapsed .pnl-bd{display:none}
.pnl-hd .grow{flex:1}
.pnl-hd label{font-weight:400;color:var(--dim);display:flex;align-items:center;gap:4px;cursor:pointer}
.pnl-bd{padding:10px}
/* Designs / Logos / Shapes / Text tabs */
.tabs{display:flex;border-bottom:1px solid var(--border);margin:-10px -10px 10px}
.tabs button{flex:1;background:none;border:0;border-bottom:2px solid transparent;padding:8px 4px;cursor:pointer;color:var(--dim)}
.tabs button.on{color:var(--text);border-bottom-color:var(--accent)}
/* library tiles: 2 per row; .thumb is the little picture; logos/shapes get square tiles */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.tile{background:#262626;border:1px solid var(--border-soft);border-radius:5px;padding:5px;cursor:grab;display:flex;flex-direction:column;gap:4px}
.tile:hover{border-color:var(--accent)}
.thumb{position:relative;width:100%;aspect-ratio:3/2;border-radius:3px;background:#fff;overflow:hidden}
.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.grid.logos .thumb{aspect-ratio:1;background:#1a1a1a}
.grid.logos .thumb img{padding:8px}
.tile span{font-size:11px;color:var(--dim);text-align:center}
.grid.shapes .thumb{aspect-ratio:1;background:#8f8f8f}
.grid.shapes .thumb img{padding:8px}
.tile{position:relative}
/* the small download / delete buttons on My shapes tiles */
.tile .tbtn{position:absolute;top:3px;width:20px;height:20px;border:0;border-radius:4px;background:rgba(0,0,0,.65);color:#fff;font-size:12px;line-height:20px;padding:0;cursor:pointer;display:none;z-index:2}
.tile:hover .tbtn{display:block}
.tile .tbtn.del{right:3px}.tile .tbtn.dl{right:26px}
.tile .tbtn:hover{background:var(--accent)}
.tile span[contenteditable="true"]{outline:1px solid var(--accent);color:var(--text);cursor:text}
.tag{position:absolute;left:4px;top:4px;background:rgba(0,0,0,.65);color:#fff;font-size:9px;padding:1px 5px;border-radius:3px;z-index:2}
/* form bits: small grey notes, checkboxes, labeled boxes, cards */
.note{color:var(--dim);margin:0 0 8px;font-size:11px;line-height:1.5}
.check-row{display:flex;align-items:center;gap:6px;margin:0 0 10px;color:var(--text);cursor:pointer}
.field{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.field>label,.k{color:var(--dim);font-size:11px}
input[type=text],input[type=number],select{width:100%;background:var(--input);border:1px solid var(--border);border-radius:4px;padding:5px 7px;min-width:0}
input:focus,select:focus{outline:none;border-color:var(--accent)}
input:disabled{opacity:.45}
.card{background:#282828;border:1px solid var(--border-soft);border-radius:6px;padding:10px;margin-bottom:10px}
.wide{width:100%;margin-top:4px}
.upload{display:block;text-align:center;margin-top:10px}
.upload input{display:none}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:6px 8px}
.pair{display:flex;align-items:center;gap:6px}
.pair .k{width:14px;flex:none;text-align:center}
.sub{color:var(--dim);font-size:10.5px;text-transform:uppercase;letter-spacing:.7px;margin:14px 0 7px}
.sub:first-child{margin-top:0}
input[type=range]{width:100%;accent-color:var(--accent)}
.empty-state{color:var(--dim);line-height:1.6}
.empty-state b{color:var(--text);font-weight:600}
/* blue tip box on the right when nothing is picked */
.tipbox{background:#26303d;border:1px solid #34506f;border-radius:6px;padding:8px 10px;color:#c9dbf2;line-height:1.5;margin-top:12px}

/* ---------- layers ---------- */
.layers{max-height:340px;overflow-y:auto;margin:-10px}
.layer{display:flex;align-items:center;gap:3px;padding:2px 6px;border-bottom:1px solid #2a2a2a;cursor:pointer;height:28px}
.layer:hover{background:#383838}
.layer.sel{background:var(--sel)}
.layer.off .lname,.layer.off .lchip{opacity:.4}
.layer .ib{padding:2px}
.layer .ib svg{width:14px;height:14px}
.layer .ib.faint{opacity:.3}
.lchip{width:16px;height:16px;border:1px solid #111;border-radius:2px;flex:none;margin:0 4px}
.lname{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layer.drop-above{box-shadow:inset 0 2px 0 var(--accent)}
.layer.drop-below{box-shadow:inset 0 -2px 0 var(--accent)}

/* ---------- work area ---------- */
.work{display:grid;grid-template-columns:20px minmax(0,1fr);grid-template-rows:auto 20px minmax(0,1fr);min-width:0;min-height:0;background:var(--paste)}
.doctabs{grid-column:1/-1;background:var(--bar);display:flex;border-bottom:1px solid #151515}
.doctab{padding:6px 16px;background:var(--panel);border-right:1px solid #151515;font-size:11px}
.corner{grid-column:1;grid-row:2;background:#2a2a2a;border-right:1px solid #1a1a1a;border-bottom:1px solid #1a1a1a}
canvas.ruler{display:block;background:#2a2a2a}
#rulerTop{grid-column:2;grid-row:2;width:100%;height:20px;border-bottom:1px solid #1a1a1a}
#rulerLeft{grid-column:1;grid-row:3;width:20px;height:100%;border-right:1px solid #1a1a1a}
.work.no-rulers{grid-template-columns:0 minmax(0,1fr);grid-template-rows:auto 0 minmax(0,1fr)}
.work.no-rulers .ruler,.work.no-rulers .corner{display:none}
.viewport{grid-column:2;grid-row:3;position:relative;overflow:hidden;min-width:0;min-height:0}
.viewport.over::after{content:"Drop it here";position:absolute;inset:10px;border:2px dashed var(--accent);border-radius:8px;display:grid;place-items:center;font-size:18px;font-weight:600;color:#fff;background:rgba(55,142,240,.12);pointer-events:none;z-index:6}
#overlay{position:absolute;inset:0;z-index:5;touch-action:none}
#overlay[data-tool=hand]{cursor:grab}
#overlay.grabbing{cursor:grabbing}
#overlay[data-tool=zoom]{cursor:zoom-in}
#overlay[data-tool=eyedropper]{cursor:crosshair}
#overlay[data-tool=name],#overlay[data-tool=number]{cursor:text}

/* ---------- status bar ---------- */
.status{display:flex;align-items:center;gap:16px;background:var(--bar);border-top:1px solid #111;padding:0 10px;color:var(--dim);font-size:11px;white-space:nowrap;overflow:hidden}
.status input{width:60px;padding:1px 5px;font-size:11px}
.status .hint{margin-left:auto;color:#b8c7da}

/* ---------- help dialog ---------- */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:grid;place-items:center;z-index:100}
.modal-box{background:#333;border:1px solid #4a4a4a;border-radius:8px;width:min(480px,92vw);max-height:82vh;overflow:auto;padding:18px 20px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.modal-box h2{margin:0 0 12px;font-size:15px;display:flex;justify-content:space-between;align-items:center}
.modal-box table{width:100%;border-collapse:collapse}
.modal-box td{padding:5px 0;border-bottom:1px solid #404040}
.modal-box td:last-child{text-align:right;color:var(--dim)}

/* ---------- phones & small tablets ---------- */
@media (max-width:600px){
  html,body{overflow:auto;height:auto}
  body{grid-template-rows:auto auto auto auto}
  .menubar{flex-wrap:wrap;padding:4px 8px;min-height:32px}
  .doc-title,.tool-name,.status .hint{display:none}
  .optbar{min-height:42px}
  main{grid-template-columns:1fr}
  .toolbar{order:0;flex-direction:row;justify-content:center;border-right:0;border-bottom:1px solid #151515;padding:4px}
  .work{order:1;height:60vh;grid-template-columns:0 minmax(0,1fr);grid-template-rows:auto 0 minmax(0,1fr)}
  .work .ruler,.work .corner{display:none}
  .side.left{order:2;border:0}
  .side.right{order:3;border:0}
  .side{overflow:visible}
  .grid{grid-template-columns:repeat(3,1fr)}
}

.app-title{font-weight:600;margin-right:10px;white-space:nowrap}
.toast{position:fixed;left:50%;bottom:40px;transform:translateX(-50%);z-index:120;background:#5a2a2a;border:1px solid #a54848;color:#fff;padding:10px 16px;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.5);max-width:min(560px,90vw);text-align:center}
@media (max-width:980px){.app-title{display:none}}

.zoom-opts{display:flex;align-items:center;gap:6px;flex:none}
.zoom-opts .seg{flex:none}
.zoom-opts .seg button{padding:4px 10px;white-space:nowrap}
#overlay[data-tool=zoomout]{cursor:zoom-out}
.status{gap:12px}
.zbtn{background:#3b3b3b;border:1px solid #4c4c4c;border-radius:4px;width:22px;height:18px;line-height:14px;padding:0;cursor:pointer;color:var(--text)}
.zbtn:hover{background:#4a4a4a}
.status input#zoomPct{margin:0 -6px;text-align:center}

#bikeSel{font-weight:600}
/* embed=1: inside your website the site already shows your logo */
body.embed .studios-menu, body.embed .app-title, body.embed .doc-title{display:none}

/* ---------- medium width (Ecwid description box, small tablets) ----------
   tools on the left, the artboard big on top,
   Libraries | Properties | Layers side by side underneath */
@media (min-width:601px) and (max-width:980px){
  body{grid-template-rows:auto auto minmax(0,1fr) 24px}
  .menubar{flex-wrap:wrap;row-gap:2px;padding:3px 8px}
  .doc-title,.tool-name,.status .hint{display:none}
  .optbar{flex-wrap:wrap;row-gap:4px;padding:4px 8px;overflow:visible}
  main{grid-template-columns:44px repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr) minmax(0,290px)}
  .toolbar{grid-column:1;grid-row:1/3}
  .work{grid-column:2/5;grid-row:1;grid-template-columns:0 minmax(0,1fr);grid-template-rows:auto 0 minmax(0,1fr)}
  .work .ruler,.work .corner{display:none}
  .side.left{grid-column:2;grid-row:2;border-right:1px solid #151515;border-top:1px solid #151515}
  .side.right{grid-column:3/5;grid-row:2;display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border-left:0;border-top:1px solid #151515}
  .side.right .pnl{overflow-y:auto;min-height:0;border-left:1px solid #1c1c1c}
  .layers{max-height:none;margin:-10px}
  .tipbox{display:none}
}

/* Save button + "Saved!" note */
.btn.save{background:var(--save,#ff6a00);border-color:var(--save,#ff6a00);color:#fff;font-weight:700;margin-left:6px;padding:5px 16px}
.btn.save:hover{background:var(--save-h,#ff8124)}
.saved-back{position:fixed;inset:0;z-index:130;background:rgba(0,0,0,.55);display:grid;place-items:center;padding:16px}
.saved-back[hidden]{display:none}
.saved-card{background:#2b2b2b;border:1px solid #555;border-radius:12px;padding:22px 24px;max-width:400px;width:100%;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.saved-check{width:52px;height:52px;margin:0 auto 8px;border-radius:50%;background:#2e9d4f;color:#fff;font:700 30px/52px Arial}
.saved-card h3{margin:0 0 8px;font-size:22px}
.saved-card p{margin:0 0 12px;line-height:1.5;color:#ddd}
.saved-card code{color:#ffb27a;word-break:break-all}
.saved-next{background:#363636;border-radius:8px;padding:10px 12px}
.saved-card .btn.save{margin:4px 0 0;font-size:15px;padding:8px 26px}

/* scroll bars on the drawing area */
.sb{position:absolute;z-index:5;background:rgba(0,0,0,.25)}
.sb-h{left:0;right:12px;bottom:0;height:12px}
.sb-v{top:0;bottom:12px;right:0;width:12px}
.sb .sb-thumb{position:absolute;background:#6a6a6a;border-radius:6px;border:2px solid transparent;background-clip:padding-box;cursor:default}
.sb .sb-thumb:hover,.sb .sb-thumb.drag{background-color:#8c8c8c}
.sb-h .sb-thumb{top:0;bottom:0}
.sb-v .sb-thumb{left:0;right:0}
.sb[hidden]{display:none}

/* help button, group + contour, welcome back, help guide */
.btn.helpbtn{margin-right:6px}
.btn.helpbtn[data-cmd="help"]{display:none}            /* Help is in the menu bar; this button only shows when the menus are hidden (simple layout) */
body.simple .btn.helpbtn[data-cmd="help"]{display:inline-block}
.rowbtns{display:flex;gap:6px;margin:6px 0 4px}
.rowbtns .btn{flex:1}
.rowbtns[hidden]{display:none}
.dim{color:var(--dim);font-weight:400}
.ctrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ctrow input[type=color]{width:34px;height:26px;padding:0;border:1px solid #555;border-radius:4px;background:none;cursor:pointer}
.ctrow .ctw{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--dim)}
.ctrow .ctw input{width:52px}
.ctrow .btn{margin-left:auto}
.help-box{width:min(680px,94vw)}
.help-tabs{display:flex;gap:4px;margin:0 0 12px;border-bottom:1px solid #4a4a4a;flex-wrap:wrap}
.help-tabs button{background:none;border:0;border-bottom:2px solid transparent;color:var(--dim);padding:6px 10px;cursor:pointer;font:inherit}
.help-tabs button.on{color:#fff;border-bottom-color:var(--accent)}
.help-box section[hidden]{display:none}
.help-box h4{margin:12px 0 6px;font-size:13px}
.help-box p{line-height:1.5;margin:0 0 8px}
.help-box td{vertical-align:top}
.help-box td:first-child{white-space:nowrap;padding-right:14px}
.help-box td:last-child{text-align:left}
.help-box .hi svg{width:16px;height:16px;vertical-align:-3px}
.steps{padding-left:20px;margin:0;line-height:1.55}
.steps li{margin:0 0 8px}
.tipline{background:#2b2b2b;border-radius:6px;padding:8px 10px;color:#cfd8e3}
.help-box .hi{display:inline-block}
.help-box .hi svg{display:inline-block}

/* mouse pointers for the bucket, square and pen tools */
#overlay[data-tool=bucket]{cursor:crosshair}
.bucket-opts{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--dim)}
.bucket-opts[hidden]{display:none}
.bucket-opts label{display:flex;align-items:center;gap:6px}
.bucket-opts input[type=range]{width:110px}

#charSec .one-only[hidden]{display:none}
#overlay[data-tool=rect],#overlay[data-tool=pen]{cursor:crosshair}
#overlay[data-tool=nodes]{cursor:default}
/* logo/trademark note and copyright line at the bottom of Help */
.help-box .legal{margin:16px 0 0;padding:10px 12px;font-size:12px;line-height:1.5;color:var(--dim);border:1px solid rgba(255,255,255,.12);border-radius:6px}
.help-box .copy{margin:14px 0 0;font-size:11px;color:var(--dim);text-align:center}

/* SEAT STUDIO: the "Your seat colors" dropdown rows */
#seatSummary .rows label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;padding:4px 0}
#seatSummary .rows span{color:var(--dim);white-space:nowrap}
#seatSummary .rows select{width:58%}
/* seat color boxes: white with dark text (like the order form) so iPhone/iPad Safari always shows the pick clearly */
#seatSummary .rows select{background-color:#fff;color:#111;-webkit-text-fill-color:#111;border-color:#bbb;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E")}
#seatSummary .rows span{flex:1}
#seatSummary .rows select{flex:none}
#seatSummary .dot{flex:none;width:18px;height:18px;border-radius:50%;border:2px solid #999;background:#000}
#seatSummary .dot.none{background:var(--none)}

/* parts a studio turns off in settings.json "hide" */
.gone{display:none !important}

/* ORDER COLUMN (settings.json "order"): the Ecwid product page on the right, in place of Properties/Layers */
body.with-order main{grid-template-columns:46px 236px minmax(0,1fr) 400px}
body.with-order .side.right{display:none}
.side.order{background:#1f1f1f;display:flex;flex-direction:column;overflow:hidden;border-left:1px solid #151515}
.order-hd{background:#ff6a00;color:#fff;font-weight:700;font-size:14px;padding:8px 12px;line-height:1.3}
.order-hd span{display:block;font-weight:400;font-size:11.5px;opacity:.95}
.side.order iframe{flex:1;width:100%;border:0;min-height:0}
.order-btn{display:none;text-decoration:none}
/* not enough room for the column: hide it, show the "Order" button, bring Properties/Layers back */
@media (max-width:1180px){
  body.with-order main{grid-template-columns:46px 236px minmax(0,1fr) 270px}
  body.with-order .side.order{display:none}
  body.with-order .side.right{display:block}
  body.with-order .order-btn{display:inline-block;background:#2f7d32;border-color:#2f7d32;color:#fff;font-weight:700}
}
@media (max-width:980px){ body.with-order .side.right{display:grid} }
@media (max-width:600px){ body.with-order main{grid-template-columns:1fr} }

/* "← RRD website" button in the menu bar */
.sitebtn{text-decoration:none;display:inline-flex;align-items:center;color:var(--text)}
body.embed .sitebtn{display:none}
@media (max-width:1180px){ .sitebtn{font-size:0} .sitebtn::before{content:"← RRD";font-size:12px} }

/* ---------- SIMPLE layout (settings.json "simple": true, e.g. Seat Studio) on tablets & phones ----------
   No drawing tools: the seat big on top, "Your seat colors" and the order form underneath.
   The page scrolls like a normal web page. */
@media (max-width:1180px){
  html.simple{overflow:auto;height:auto}
  body.simple{overflow:visible;height:auto}
  body.simple{display:block}
  body.simple .optbar, body.simple .status, body.simple .toolbar, body.simple .side.right,
  body.simple .menubar .menu, body.simple .menubar .doc-title, body.simple .order-btn,
  body.simple .work .ruler, body.simple .work .corner, body.simple .doctabs{display:none !important}
  body.simple .menubar{position:sticky;top:0;z-index:40;height:auto;min-height:44px;flex-wrap:wrap;row-gap:4px;padding:4px 8px}
  body.simple .menubar .app-title{display:block}
  body.simple main{display:grid;grid-template-columns:330px minmax(0,1fr);grid-template-rows:auto auto;
                   grid-template-areas:"work work" "left order";min-height:0}
  body.simple .work{grid-area:work;height:52vh;min-height:260px;grid-template-columns:0 minmax(0,1fr);grid-template-rows:0 0 minmax(0,1fr)}
  body.simple .side.left{grid-area:left;overflow:visible;border:0}
  body.simple .side.left .pnl-hd,
  body.simple .side.left [data-panel="designs"] > :not(#seatSummary):not(#brandRow){display:none !important}
  body.simple #brandRow{padding:10px 10px 0;margin:0}
  body.simple #brandRow label{font-size:13px}
  body.simple #brandSel{font-size:16px;padding:8px;background-color:#fff;color:#111;-webkit-text-fill-color:#111}
  body.simple #seatSummary{margin-top:0 !important}
  body.simple #seatSummary .rows label{font-size:15px;margin-bottom:8px}
  body.simple #seatSummary .rows select{font-size:16px;padding:8px;width:58%}
  body.simple #seatSummary .dot{width:24px;height:24px}
  body.simple .side.order{display:flex !important;grid-area:order;height:1200px;border-left:1px solid #151515}
  body.simple .btn{padding:8px 12px;font-size:14px}
  body.simple .sitebtn::before{content:none}
  body.simple .side.left{position:sticky;top:52px;align-self:start}   /* colors stay in view while scrolling the order form */
}
@media (max-width:1180px) and (orientation:landscape){ body.simple .work{height:62vh} }
@media (max-width:700px){
  body.simple main{grid-template-columns:minmax(0,1fr);grid-template-areas:"work" "left" "order"}
  body.simple .work{height:42vh}
  body.simple .side.order{border-left:0;border-top:1px solid #151515}
  body.simple .menubar .app-title{display:none}
  body.simple .side.left{position:static}
}

/* ---------- iPhone/iPad Safari (dark mode): its own select text can come out black on our dark boxes.
   Tell the browser this is a dark page, and draw dropdowns ourselves with light text + an arrow. ---------- */
:root{color-scheme:dark}
select{color:var(--text);-webkit-text-fill-color:var(--text);-webkit-appearance:none;appearance:none;
  background:var(--input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding-right:24px}
select option{color:#111;-webkit-text-fill-color:#111;background:#fff}

/* Fill: Solid / Fade (two-color fades) */
#fadeSec{margin:8px 0 6px}
.fadehd{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.fadehd span{color:var(--dim)}
.fseg{display:inline-flex;border:1px solid #4c4c4c;border-radius:5px;overflow:hidden}
.fseg button{background:#333;border:0;padding:3px 12px;cursor:pointer;color:inherit}
.fseg button+button{border-left:1px solid #4c4c4c}
.fseg button.on{background:var(--accent);color:#fff}
.frow{display:flex;align-items:center;gap:8px}
.frow input[type=range]{flex:1}
.fend{width:30px;height:30px;border-radius:5px;border:2px solid #666;cursor:pointer;flex:none}
.fend.on{border-color:#fff;box-shadow:0 0 0 2px var(--accent)}
.fbar{flex:1;height:16px;border-radius:4px;border:1px solid #555}
.fhint{font-size:11px;color:var(--dim);margin:5px 0 8px}

/* contour: edit an existing one */
.ctedit{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:11px;color:var(--dim)}
.ctedit span{flex:1}

/* ORDER TABS (settings.json order.tabs): Design / Order tabs share the right column */
body.order-tabs main{grid-template-columns:46px 236px minmax(0,1fr) 380px}
body.order-tabs .side.right, body.order-tabs .side.order{grid-column:4;grid-row:1}
body.order-tabs .side.right{display:block}
body.order-tabs .side.order{display:none}
body.order-tabs.tab-order .side.right{display:none}
body.order-tabs.tab-order .side.order{display:flex}
.rtabs{display:flex;gap:0;background:#232323;border-bottom:1px solid #151515;position:sticky;top:0;z-index:2}
.rtabs button{flex:1;background:none;border:0;border-bottom:3px solid transparent;color:#bbb;font:600 13px/1 inherit;padding:11px 6px;cursor:pointer}
.rtabs button:hover{color:#fff;background:#2a2a2a}
.rtabs button.on{color:#fff;border-bottom-color:#ff6a00;background:#2b2b2b}
.rtabs button:focus-visible{outline:2px solid #378ef0;outline-offset:-2px}
body.order-tabs .order-hd{border-top:0}
.btn.cart{background:#2e9d4f;border-color:#2e9d4f;color:#fff;font-weight:700}
.btn.cart:hover{background:#34b25a;border-color:#34b25a}
.cart-thumb{display:block;width:100%;max-height:180px;object-fit:contain;background:#fff;border-radius:6px;margin:4px 0 12px}
#cartBox[data-state="busy"] .saved-check{background:#378ef0;animation:cartPulse 1s ease-in-out infinite}
#cartBox[data-state="bad"] .saved-check{background:#d33}
@keyframes cartPulse{50%{opacity:.5}}
@media (prefers-reduced-motion:reduce){#cartBox[data-state="busy"] .saved-check{animation:none}}
@media (max-width:1180px){
  body.order-tabs main{grid-template-columns:46px 236px minmax(0,1fr) 330px}
  body.order-tabs.tab-order .side.order{display:flex}
  body.order-tabs:not(.tab-order) .side.order{display:none}
  body.order-tabs:not(.tab-order) .side.right{display:block}
}
@media (max-width:980px){
  body.order-tabs .side.right, body.order-tabs .side.order{grid-column:3/5;grid-row:2}
  body.order-tabs:not(.tab-order) .side.right{display:grid;grid-template-rows:auto 1fr}
  body.order-tabs .side.right .rtabs{grid-column:1/-1}
  body.order-tabs.tab-order .side.order{height:100%}
}
@media (max-width:600px){
  body.order-tabs main{grid-template-columns:1fr}
  body.order-tabs .side.right, body.order-tabs .side.order{grid-column:auto;grid-row:auto}
  body.order-tabs.tab-order .side.order{height:900px}
}

/* SHOWROOM VIEW */
.sr-view{position:fixed;inset:0;z-index:140;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#121418;color:#eceef2}
.sr-view[hidden]{display:none}
.sr-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid #2a2e36}
.sr-title{font-weight:700;font-size:16px}
.sr-title span{font-weight:400;color:#9aa1ad;margin-left:10px;font-size:13px}
.sr-stage{position:relative;overflow:hidden;cursor:grab;touch-action:none;user-select:none;outline:none;
  background:radial-gradient(120% 90% at 50% 30%,#1d2027,#121418 75%)}
.sr-stage:active{cursor:grabbing}
.sr-stage:focus-visible{box-shadow:inset 0 0 0 2px #378ef0}
.sr-stage::after{content:"";position:absolute;left:0;right:0;bottom:0;height:28%;background:linear-gradient(to bottom,transparent,#262a32);pointer-events:none}
.sr-zoom{position:absolute;inset:0;perspective:1600px;transform-origin:0 0;z-index:1}
.sr-shadow{position:absolute;left:50%;bottom:15%;width:70%;height:6%;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(0,0,0,.7),transparent);border-radius:50%}
.sr-turn{position:absolute;left:50%;top:50%;max-width:none;transform-style:preserve-3d;will-change:transform}
.sr-turn img,.sr-turn .sr-shine{position:absolute;inset:0;width:100%;height:100%;max-width:none;pointer-events:none;-webkit-user-drag:none}
.sr-turn img.face{backface-visibility:hidden;-webkit-backface-visibility:hidden}
.sr-turn img.slice{filter:brightness(.28) saturate(.6)}
.sr-shine{-webkit-mask-size:100% 100%;mask-size:100% 100%;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.sr-label{position:absolute;left:0;right:0;bottom:3.5%;text-align:center;color:#fff;font-family:'Russo One','Black Ops One',Impact,sans-serif;font-style:italic;font-size:clamp(22px,4.2vw,54px);letter-spacing:.06em;transform:skewX(-8deg);text-shadow:0 2px 14px rgba(0,0,0,.6);pointer-events:none}
.sr-busy{position:absolute;inset:0;display:none;place-items:center;font-size:16px;color:#9aa1ad;z-index:2}
.sr-view.busy .sr-busy{display:grid}
.sr-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:10px 16px;border-top:1px solid #2a2e36}
.sr-z{display:flex;align-items:center;gap:6px}
.sr-z .btn{min-width:34px;font-size:18px;line-height:1;padding:4px 0}
.sr-z input{width:140px;accent-color:#ff6a00}
.sr-hint{color:#9aa1ad;font-size:12.5px;margin-left:auto}
@media (max-width:700px){.sr-hint{margin-left:0;width:100%}}

/* ===== RRD VECTOR BUTTON + POP-UP (settings.json "rrdVector") ===== */
.btn.vecbtn{display:block;width:100%;margin:0 0 8px;padding:8px 12px;background:#d7261e;border-color:#d7261e;color:#fff;font-weight:700;text-align:center;white-space:normal}
.btn.vecbtn:hover{background:#e8392f;border-color:#e8392f}
.btn.vecbtn small{display:block;font-weight:400;font-size:11px;opacity:.9}
.vecbox{position:fixed;inset:0;z-index:500;background:rgba(0,0,0,.65);display:grid;place-items:center;padding:16px}
.vecpanel{width:min(1240px,100%);height:min(860px,100%);background:#111316;border:1px solid #3a3f45;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.vechead{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 14px;border-bottom:1px solid #2c3238;color:#e7eaed}
.vechead b{font-size:15px}
.vechead span{color:#9aa4ae;font-size:13px;flex:1}
.vechead button{background:#2a2f35;border:1px solid #3a3f45;color:#e7eaed;border-radius:5px;padding:4px 12px;cursor:pointer;font-size:14px}
.vechead button:hover{background:#3a3f45}
.vecpanel iframe{flex:1;border:0;width:100%;background:#111316}

/* WOO CART ICON (settings.json order.woo): cart + number at the top right, links to the store's cart */
.btn.cartlink{display:inline-flex;align-items:center;gap:5px;margin-left:6px;text-decoration:none;color:#fff;background:#2b2b2b;border-color:#555;position:relative}
.btn.cartlink:hover{background:#3a3a3a}
.btn.cartlink .cartnum{min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:10px;background:#666;color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center}
.btn.cartlink.has .cartnum{background:#2e9d4f}
.btn.cartlink .cartword{font-weight:700}
.btn.cartlink.bump{animation:cartbump .9s ease}
@keyframes cartbump{0%{transform:scale(1)}25%{transform:scale(1.25);box-shadow:0 0 0 4px rgba(46,157,79,.5)}100%{transform:scale(1)}}
@media (max-width:900px){.btn.cartlink .cartword{display:none}}
#toast.ok{background:#1f7a3a !important;border-color:#2e9d4f !important;color:#fff !important}
/* Log in / My account link next to the Woo cart (settings.json order.account) */
.btn.acctlink{display:inline-flex;align-items:center;gap:5px;margin-left:6px;text-decoration:none;color:#fff;background:#2b2b2b;border-color:#555}
.btn.acctlink:hover{background:#3a3a3a}
.btn.acctlink .acctword{font-weight:700}
@media (max-width:900px){.btn.acctlink .acctword{display:none}}
/* Save My Design → also saved in the customer's account (Woo studios) */
.saved-acct{margin:10px 0 14px;padding:9px 11px;border-radius:6px;background:#2a2f3a;border:1px solid #475066;color:#dde;font-size:13px;line-height:1.4}
.saved-acct a{color:#9cc8ff;font-weight:700}
.saved-acct.ok{background:#1d3a24;border-color:#2f8a45;color:#c9f2d3}
.saved-acct.ok a{color:#fff}
.saved-acct.bad{background:#4a1f1f;border-color:#a33;color:#fff}
/* AI logo link in the Logos tab (settings.json aiLogo) */
.btn.aibtn{display:block;width:100%;box-sizing:border-box;margin:-2px 0 10px;padding:8px 12px;background:#5b3fb8;border-color:#5b3fb8;color:#fff;font-weight:700;text-align:center;white-space:normal;text-decoration:none}
.btn.aibtn:hover{background:#6c50cc;border-color:#6c50cc}
.btn.aibtn small{display:block;font-weight:400;font-size:11px;opacity:.92;margin-top:2px}

/* HOST BRAND (bike site look): a wide logo in the top-left and a "Back to shop" link */
.logo.hostlogo{width:auto;height:30px;border-radius:0;max-width:150px;object-fit:contain;margin:0 4px}
.btn.shoplink{display:inline-flex;align-items:center;margin-left:6px;text-decoration:none;color:#fff;background:#2b2b2b;border-color:#555}
.btn.shoplink:hover{background:#3a3a3a}
.btn.shoplink + .btn.acctlink{margin-left:6px}
