/* PureSketchy Malstudio – Werkzeug zum Online-Ausmalen. Alle Regeln gelten nur innerhalb von .ms */
.ms{
  --bg:#EEF2F8; --panel:#FFFFFF; --ink:#16181D; --muted:#5B6472; --line:#D5DCE8;
  --accent:#E63946; --accent-ink:#FFFFFF; --stage:#DCE3EE; --paper:#FFFFFF; --veil:rgba(22,24,29,.45);
  --font-body:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-brand:"Permanent Marker","Comic Sans MS",cursive;
  --r:14px;
}
.ms *{box-sizing:border-box}
.ms [hidden]{display:none!important}
.ms button{font:inherit;color:inherit;cursor:pointer}
.ms button:focus-visible,.ms input:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ms .app{flex:1;min-height:0;display:grid;grid-template-rows:auto auto 1fr;gap:10px;padding-block:10px}
.ms .top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.ms .brand{font-weight:800;font-size:20px;letter-spacing:-.01em;margin:0}
.ms .brand span{font-family:var(--font-brand);color:var(--accent);font-weight:400}
.ms .brand small{font-weight:600;font-size:12px;color:var(--muted);margin-left:8px;letter-spacing:.06em;text-transform:uppercase}
.ms .top .grow{flex:1}
.ms .pill{background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-weight:600;min-height:40px}
.ms .pill[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.ms .pill.primary{background:var(--ink);color:var(--panel);border-color:var(--ink)}
.ms .motifs{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.ms .motif{flex:0 0 auto;width:62px;background:var(--paper);border:2px solid var(--line);border-radius:10px;padding:3px;display:flex;flex-direction:column;align-items:center;gap:2px}
.ms .motif img{width:100%;height:58px;object-fit:contain;display:block}
.ms .motif span{font-size:10px;font-weight:600;color:var(--muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms .motif[aria-pressed="true"]{border-color:var(--accent)}
.ms .motif[aria-pressed="true"] span{color:var(--ink)}
.ms .work{min-height:0;display:grid;gap:10px;grid-template-columns:1fr;grid-template-rows:auto 1fr auto}
.ms .side{display:flex;flex-direction:column;gap:6px;min-width:0}
.ms .tools,.ms .opts{display:flex;gap:6px;align-items:center;overflow-x:auto;scrollbar-width:none;padding:2px}
.ms .tool{flex:0 0 auto;background:var(--panel);border:2px solid var(--line);border-radius:12px;min-width:48px;min-height:48px;padding:6px 10px;display:flex;align-items:center;justify-content:center;gap:7px;font-weight:600}
.ms .tool svg{width:22px;height:22px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ms .tool .lbl{display:none}
.ms .tool[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--panel)}
.ms .tool:disabled{opacity:.4;cursor:default}
.ms .sep{flex:0 0 auto;width:1px;align-self:stretch;background:var(--line);margin:0 2px}
.ms .chip{flex:0 0 auto;background:var(--panel);border:2px solid var(--line);border-radius:999px;min-height:44px;padding:6px 14px;font-weight:600}
.ms .chip[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--panel)}
.ms .size{flex:0 0 auto;width:44px;height:44px;border-radius:12px;border:2px solid var(--line);background:var(--panel);display:grid;place-items:center}
.ms .size i{display:block;border-radius:50%;background:var(--ink)}
.ms .size[aria-pressed="true"]{border-color:var(--ink)}
.ms .stage{min-height:0;min-width:0;background:var(--stage);border-radius:var(--r);overflow:auto;display:flex;padding:8px;position:relative}
.ms .sheet{margin:auto;position:relative;background:var(--paper);box-shadow:0 2px 10px rgba(22,24,29,.18);flex:0 0 auto}
.ms .sheet canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.ms #paint{touch-action:none;cursor:crosshair}
.ms #live,.ms #lines,.ms #nums{pointer-events:none}
.ms #lines{mix-blend-mode:multiply}
.ms .palette{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:8px;display:flex;gap:10px;align-items:center;overflow-x:auto}
.ms .swatches,.ms .mine{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,40px);gap:6px;flex:0 0 auto}
.ms .sw{width:40px;height:40px;border-radius:50%;border:2px solid rgba(22,24,29,.25);padding:0;position:relative}
.ms .sw[aria-pressed="true"]{box-shadow:0 0 0 3px var(--panel),0 0 0 6px var(--ink)}
.ms .minebox{display:flex;flex-direction:column;gap:6px;flex:0 0 auto}
.ms .cap{font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.05em;text-transform:uppercase;margin:0}
.ms .empty{font-size:12px;color:var(--muted);margin:0;max-width:150px}
.ms .mixbtn{order:-1;flex:0 0 auto;background:var(--accent);color:var(--accent-ink);border:0;border-radius:12px;min-height:48px;padding:8px 14px;font-weight:800}
.ms .numpal{display:flex;gap:6px;flex:0 0 auto;flex-wrap:wrap}
.ms .numchip{display:flex;align-items:center;gap:6px;border:2px solid var(--line);background:var(--panel);border-radius:999px;padding:3px 10px 3px 3px;font-weight:800;min-height:40px}
.ms .numchip i{display:block;width:30px;height:30px;border-radius:50%;border:2px solid rgba(22,24,29,.25)}
.ms .numchip[aria-pressed="true"]{border-color:var(--ink)}
.ms .stampbtn{flex:0 0 auto;width:48px;height:48px;border-radius:12px;border:2px solid var(--line);background:var(--panel);display:grid;place-items:center;padding:0}
.ms .stampbtn canvas{width:30px;height:30px}
.ms .stampbtn[aria-pressed="true"]{border-color:var(--ink)}
.ms .note{font-size:12px;color:var(--muted);margin:0}
.ms .mix{position:fixed;inset:0;background:var(--veil);display:grid;place-items:center;z-index:20;padding:16px}
.ms .mixbox{background:var(--panel);border-radius:18px;padding:18px;width:min(420px,100%);max-height:100%;overflow:auto;display:flex;flex-direction:column;gap:14px}
.ms .mixhead{display:flex;align-items:center;justify-content:space-between}
.ms .mixhead h2{margin:0;font-size:18px}
.ms .x{border:0;background:var(--bg);border-radius:50%;width:40px;height:40px;font-size:20px;line-height:1}
.ms .mixrow{display:grid;grid-template-columns:64px 1fr 64px;gap:12px;align-items:center}
.ms .slot{width:64px;height:64px;border-radius:50%;border:3px solid var(--line);padding:0}
.ms .slot[aria-pressed="true"]{border-color:var(--ink);box-shadow:0 0 0 3px var(--panel),0 0 0 6px var(--ink)}
.ms .mixrow input[type=range]{width:100%;accent-color:var(--ink);height:32px}
.ms .result{display:flex;align-items:center;gap:14px}
.ms .result i{display:block;width:84px;height:84px;border-radius:22px;border:2px solid rgba(22,24,29,.25);flex:0 0 auto}
.ms .result p{margin:0;color:var(--muted);font-size:13px}
.ms .pick{display:flex;flex-wrap:wrap;gap:8px}
.ms .pick .sw{width:34px;height:34px}
.ms .del{position:absolute;right:-6px;top:-6px;width:20px;height:20px;border-radius:50%;background:var(--ink);color:var(--panel);font-size:13px;line-height:20px;text-align:center;font-weight:800}
.ms .mixact{display:flex;gap:8px;flex-wrap:wrap}
.ms .mixact .pill{flex:1 1 auto}
.ms .picker{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted);font-weight:600}
.ms .picker input{width:44px;height:36px;border:0;padding:0;background:none}
.ms #printimg{display:none}
@media (min-width:900px){
.ms .work{grid-template-columns:208px 1fr 236px;grid-template-rows:1fr}
.ms .side{overflow-y:auto;gap:12px}
.ms .tools{display:grid;grid-template-columns:1fr 1fr;overflow:visible}
.ms .numpal{justify-content:center}
.ms .tools .sep{display:none}
.ms .opts{flex-direction:column;align-items:stretch;overflow:visible;border-top:1px solid var(--line);padding-top:12px}
.ms .tool{justify-content:flex-start;padding:6px 8px;font-size:14px;gap:6px}
.ms .tool .lbl{display:inline}
.ms .opts .row{display:flex;gap:6px;flex-wrap:wrap}
.ms .palette{flex-direction:column;align-items:stretch;overflow:auto}
.ms .swatches,.ms .mine{grid-auto-flow:row;grid-template-rows:none;grid-template-columns:repeat(4,44px);gap:10px;justify-content:center}
.ms .sw{width:44px;height:44px}
.ms .empty{max-width:none}
.ms .mixbtn{order:0}
}
@media (max-width:899px){
.ms .opts .row{display:contents}
}
/* ---------- Einbindung in die Seite ---------- */
.ms{font-family:var(--font-body);font-size:15px;color:var(--ink);background:var(--bg);border-radius:18px;padding:12px;margin:14px 0 26px;line-height:1.3}
.ms .app{height:min(900px,calc(100svh - 24px));min-height:540px;padding-block:0;grid-template-rows:auto 1fr}
.ms button{font-family:inherit;line-height:1.2}
.ms p{line-height:1.35}
.ms .top{gap:8px}
.ms .pill.go{background:var(--ink);color:var(--panel);border-color:var(--ink)}
.ms .pill.heart[aria-pressed="true"]{background:var(--panel);color:var(--accent);border-color:var(--accent)}
.ms .mix,.ms .pk{z-index:3000}
.ms .pk{position:fixed;inset:0;background:var(--veil);display:grid;place-items:center;padding:16px}
.ms .pkbox{background:var(--panel);border-radius:18px;padding:18px;width:min(860px,100%);max-height:100%;overflow:auto;display:flex;flex-direction:column;gap:14px}
.ms .pkgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.ms .pcard{background:var(--paper);border:2px solid var(--line);border-radius:12px;padding:6px;display:flex;flex-direction:column;gap:4px;align-items:stretch;text-align:center;font-size:12px;font-weight:600;color:var(--ink);text-decoration:none;cursor:pointer}
.ms .pcard:hover{border-color:var(--ink)}
.ms .pcard .pi{position:relative;aspect-ratio:1/1.414;background:#fff;border-radius:6px;overflow:hidden}
.ms .pcard .pi img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.ms .pcard .pi img.ln{mix-blend-mode:multiply}
.ms .pcard span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms .done{display:flex;flex-direction:column;gap:18px;align-items:center;padding:10px 0 4px}
.ms .done h2{margin:0;font-size:22px}
.ms .done img.res{max-height:62vh;max-width:100%;background:#fff;box-shadow:0 2px 10px rgba(22,24,29,.18)}
.ms .done .acts{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.ms .morerow{width:100%}
.ms .err{background:var(--panel);border:2px solid var(--accent);border-radius:12px;padding:14px;margin:0}
.ms-more{margin:10px 0 30px}
.ms-more .pkgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
.ms-more .pcard{background:#fff;border:2px solid #e6e9ef;border-radius:12px;padding:6px;display:flex;flex-direction:column;gap:4px;text-align:center;font-size:13px;font-weight:600;color:#16181D;text-decoration:none}
.ms-more .pcard .pi{position:relative;aspect-ratio:1/1.414;background:#fff}
.ms-more .pcard .pi img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.ms-more .pcard span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-ad{margin:40px auto;max-width:728px}
@media (max-width:899px){ .ms{padding:8px;margin-inline:-8px} .ms .app{height:calc(100svh - 12px)} }
@media print{ .ms,.ms-more,.ms-ad{display:none!important} }
