/* MINT-Material · Python-Umgebung (Turtle) + Start-Feld */

/* ---------- Start-Feld auf der Themenseite ---------- */
.py-launch{--launch-h:136px;position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:26px;
  width:100%;height:var(--launch-h);margin:0 0 40px;padding:0 34px;border:0;border-radius:18px;cursor:pointer;text-align:left;overflow:hidden;
  color:#fff;font-family:'Fredoka',Inter,sans-serif;
  background:radial-gradient(520px 260px at 12% 0%,rgba(231,154,58,.55),transparent 65%),radial-gradient(420px 260px at 95% 120%,rgba(91,139,216,.35),transparent 60%),linear-gradient(135deg,#8a4c1c 0%,#5a2f10 55%,#3a230f 100%);
  box-shadow:0 1px 2px rgba(40,30,25,.08),0 10px 28px -10px rgba(90,47,16,.55);
  transition:transform .22s cubic-bezier(.16,1,.3,1),box-shadow .25s}
.py-launch::after{content:'';position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.07) 1px,transparent 1px);background-size:20px 20px;pointer-events:none}
.py-launch:hover{transform:translateY(-3px);box-shadow:0 2px 4px rgba(40,30,25,.08),0 18px 38px -12px rgba(90,47,16,.65)}
.py-launch:focus-visible{outline:3px solid #e79a3a;outline-offset:4px}
.py-launch>*{position:relative;z-index:1}
.py-launch-ico{width:74px;height:74px;border-radius:18px;background:rgba(255,255,255,.12);border:1.5px solid rgba(255,255,255,.28);display:flex;align-items:center;justify-content:center}
.py-launch-ico svg{width:50px;height:50px;display:block}
.py-launch-txt{min-width:0}
.py-launch-txt strong{display:block;font-size:clamp(20px,2.4vw,27px);font-weight:700;line-height:1.15;letter-spacing:-.01em}
.py-launch-txt span{display:block;margin-top:5px;font-size:15.5px;font-weight:400;line-height:1.4;color:rgba(255,255,255,.86);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.py-launch-go{display:inline-flex;align-items:center;gap:10px;padding:13px 22px 13px 16px;border-radius:999px;background:#fff;color:#6b3a14;font-size:16px;font-weight:600;white-space:nowrap;
  box-shadow:0 4px 14px rgba(0,0,0,.18);transition:background .2s,color .2s}
.py-launch-go i{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:#4a7530;color:#fff;font-style:normal}
.py-launch-go i svg{width:15px;height:15px;margin-left:2px}
.py-launch:hover .py-launch-go{background:#f4d03f;color:#3a230f}
@media(max-width:780px){.py-launch{gap:16px;padding:0 20px}.py-launch-ico{width:56px;height:56px;border-radius:14px}.py-launch-ico svg{width:38px;height:38px}.py-launch-txt span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.py-launch-go span{display:none}.py-launch-go{padding:10px}}
@media(max-width:480px){.py-launch-txt span{display:none}}
@media(prefers-reduced-motion:reduce){.py-launch{transition:none}.py-launch:hover{transform:none}}
@media print{.py-launch{display:none}}

/* ---------- Umgebung (Vollbild-Dialog) ---------- */
html.pyide-open,html.pyide-open body{overflow:hidden}
.pyide{--ink:#2b241d;--soft:#6b5f53;--rule:#d9cdb8;--bg:#f4ede0;--paper:#faf6ee;--br:#6b3a14;--or:#c47a3a;
  position:fixed;inset:0;z-index:1000;display:flex;align-items:stretch;justify-content:center;padding:18px;
  background:rgba(30,20,12,.62);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);font-family:'Fredoka',Inter,sans-serif;color:var(--ink)}
.pyide[hidden]{display:none}
.pyide-win{position:relative;display:flex;flex-direction:column;width:100%;max-width:1500px;background:var(--bg);border-radius:18px;overflow:hidden;box-shadow:0 30px 80px -20px rgba(0,0,0,.55);animation:pyideIn .22s cubic-bezier(.16,1,.3,1)}
@keyframes pyideIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}

.pyide-bar{display:flex;align-items:center;gap:10px;padding:11px 14px;background:linear-gradient(135deg,#6b3a14,#3a230f);color:#fff;flex-wrap:wrap}
.pyide-title{flex:1;min-width:0;margin:0 6px;font-size:19px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pyide-btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 15px 0 11px;border:0;border-radius:10px;cursor:pointer;font:600 15px 'Fredoka',Inter,sans-serif;color:#fff;transition:background .15s,transform .15s,opacity .15s}
.pyide-btn svg{width:18px;height:18px;flex-shrink:0}
.pyide-run{background:#4a7530}.pyide-run:hover:not(:disabled){background:#5a8c3b}
.pyide-stop{background:#e2574c}.pyide-stop:hover:not(:disabled){background:#ec6b61}
.pyide-btn:disabled{opacity:.42;cursor:default}
.pyide-ghost{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22)}.pyide-ghost:hover{background:rgba(255,255,255,.22)}
.pyide-btn:focus-visible,.pyide-close:focus-visible,.pyide-ex select:focus-visible{outline:2.5px solid #f4d03f;outline-offset:2px}
.pyide-ex select{height:38px;padding:0 30px 0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center/14px;
  color:#fff;font:500 14.5px 'Fredoka',Inter,sans-serif;-webkit-appearance:none;appearance:none;cursor:pointer}
.pyide-ex option{color:#2b241d}
.pyide-close{width:38px;height:38px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font-size:18px;cursor:pointer}
.pyide-close:hover{background:rgba(255,255,255,.26)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

.pyide-main{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:12px;padding:12px}
.pyide-right{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 150px;gap:12px}
.pyide-pane{min-height:0;display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--rule);border-radius:14px;overflow:hidden}
.pyide-head{padding:7px 14px;font-size:13px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--soft);border-bottom:1px solid var(--rule);background:#f1e8d8}

.pyide-ed{flex:1;min-height:0;display:flex;background:#fffdf8}
.pyide-ed,.pyide-hl,.pyide-code textarea,.pyide-gutter,.pyide-out{font-family:ui-monospace,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:15px;line-height:1.6;tab-size:4}
.pyide-gutter{flex-shrink:0;width:46px;overflow:hidden;padding:12px 0;text-align:right;color:#b3a591;background:#f6efe2;border-right:1px solid #eadfcc;user-select:none}
.pyide-gutter span{display:block;padding-right:10px}
.pyide-gutter span.err{background:#e2574c;color:#fff;font-weight:700}
.pyide-code{position:relative;flex:1;min-width:0}
.pyide-hl,.pyide-code textarea{position:absolute;inset:0;margin:0;padding:12px 14px;border:0;white-space:pre;overflow:auto;box-sizing:border-box}
.pyide-hl{pointer-events:none;color:var(--ink);overflow:hidden}
.pyide-code textarea{resize:none;background:transparent;color:transparent;caret-color:#2b241d;outline:none}
.pyide-code textarea::selection{background:rgba(91,139,216,.28);color:transparent}
.pyide-code:focus-within{box-shadow:inset 0 0 0 2px rgba(196,122,58,.45)}
.t-kw{color:#2c5fb5;font-weight:700}.t-tu{color:#7c5fb5;font-weight:600}.t-bi{color:#b35a1f}.t-str{color:#4a7530}.t-num{color:#c47a3a}.t-com{color:#9a8e80}

.pyide-canvas{flex:1;min-height:0;position:relative;overflow:hidden;background:#ece3d4;cursor:grab;touch-action:none;outline:none}
.pyide-canvas.is-drag{cursor:grabbing}
.pyide-canvas:focus-visible{box-shadow:inset 0 0 0 3px #c47a3a}
.pyide-world{display:none}
.pyide-view{position:absolute;inset:0;width:100%;height:100%;display:block}
.pyide-head--tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:4px;padding-bottom:4px}
.pyide-zoom{display:inline-flex;align-items:center;gap:4px;text-transform:none;letter-spacing:0}
.pyide-zb{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:30px;height:28px;padding:0 8px;border:1px solid #d9cdb8;border-radius:8px;background:#fff;color:#6b3a14;font:700 16px 'Fredoka',Inter,sans-serif;cursor:pointer}
.pyide-zb:disabled{opacity:.4;cursor:default;background:#fff;border-color:#d9cdb8}
.pyide-zb:hover:not(:disabled){border-color:#c47a3a;background:#fff8f0}
.pyide-zb:focus-visible{outline:2.5px solid #c47a3a;outline-offset:1px}
.pyide-zb svg{width:15px;height:15px}
.pyide-zauto span{font-size:13px;font-weight:600}
.pyide-zv{min-width:48px;text-align:center;font:600 12.5px 'Fredoka',Inter,sans-serif;color:#6b5f53}
.pyide-out{flex:1;min-height:0;margin:0;padding:10px 14px;overflow:auto;white-space:pre-wrap;word-break:break-word;color:var(--ink);font-size:14.5px}
.pyide-out .o-err{color:#b3261e;font-weight:600}.pyide-out .o-hint{color:#6b3a14;background:#f7dcc4;border-radius:6px;padding:1px 6px;display:inline-block;margin-top:4px;font-family:'Fredoka',Inter,sans-serif}
.pyide-out .o-info{color:#6b5f53}.pyide-out .o-in{color:#2c5fb5}


.pyide-input{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(43,36,29,.38);z-index:5}
.pyide-input[hidden]{display:none}
.pyide-inbox{display:flex;flex-direction:column;gap:12px;width:min(380px,90%);padding:22px;background:var(--paper);border-radius:16px;border:1px solid var(--rule);box-shadow:0 20px 50px -12px rgba(0,0,0,.4)}
.pyide-inbox label{font-size:17px;font-weight:600}
.pyide-inbox input{height:44px;padding:0 12px;border:1.5px solid var(--rule);border-radius:10px;font:16px ui-monospace,Menlo,Consolas,monospace;background:#fff}
.pyide-inbox input:focus{outline:none;border-color:#c47a3a;box-shadow:0 0 0 3px rgba(196,122,58,.2)}
.pyide-inbox .pyide-btn{justify-content:center;padding:0 16px}

@media(max-width:900px){
  .pyide{padding:0}.pyide-win{border-radius:0}
  .pyide-main{grid-template-columns:1fr;grid-template-rows:minmax(220px,1fr) minmax(0,1.2fr);overflow:auto}
  .pyide-right{grid-template-rows:minmax(260px,1fr) 120px}
  .pyide-btn span{display:none}.pyide-btn{padding:0 10px}
}
@media(max-width:600px){.pyide-bar{flex-wrap:nowrap;gap:8px;padding:10px}.pyide-title{display:none}.pyide-ex{flex:1;min-width:0}.pyide-ex select{width:100%}}
@media(prefers-reduced-motion:reduce){.pyide-win{animation:none}.pyide-btn{transition:none}}

/* Konsolen-Modus (Python-Kapitel ohne Turtle): nur Code und Ausgabe */
.pyide--konsole .pyide-cvpane{display:none}
.pyide--konsole .pyide-right{grid-template-rows:minmax(0,1fr)}
.pyide--konsole .pyide-out{font-size:15.5px}
@media(max-width:900px){.pyide--konsole .pyide-right{grid-template-rows:minmax(240px,1fr)}}
