/* oeapp.de — Terminal-Look */

@font-face{
  font-family:"IBM Plex Mono";
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url("../fonts/IBMPlexMono-400.woff2") format("woff2");
}
@font-face{
  font-family:"IBM Plex Mono";
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url("../fonts/IBMPlexMono-500.woff2") format("woff2");
}
@font-face{
  font-family:"IBM Plex Mono";
  font-style:normal;
  font-weight:600;
  font-display:swap;
  src:url("../fonts/IBMPlexMono-600.woff2") format("woff2");
}
:root{
  --bg:#000;
  --green:#33ff66;
  --green-dim:#1a8a36;
  --green-bright:#a6ffb8;
  --amber:#ffb454;
  --red:#ff5a5a;
  --gray:#5a8a66;
  --topbar-h: 34px;
  --botbar-h: 24px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);height:100%;}
body{
  color:var(--green);
  font-family:"IBM Plex Mono", ui-monospace, "Menlo", monospace;
  font-size:14px;
  line-height:1.45;
  overflow:hidden;
  text-shadow:0 0 2px rgba(51,255,102,.55), 0 0 8px rgba(51,255,102,.18);
  -webkit-font-smoothing:antialiased;
}

/* CRT effects */
.crt::before{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:50;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0) 0px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,.18) 3px,
      rgba(0,0,0,.18) 3px
    );
  mix-blend-mode:multiply;
}
.crt::after{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:51;
  background:radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.flicker{ animation: flicker 6s infinite; }
@keyframes flicker{
  0%,100%{opacity:1}
  47%{opacity:1}
  48%{opacity:.78}
  49%{opacity:1}
  72%{opacity:.92}
  73%{opacity:1}
}
@media (prefers-reduced-motion: reduce){
  .flicker{ animation:none; }
  .crt::before{ display:none; }
}

/* Top bar */
.topbar{
  position:fixed; top:0; left:0; right:0;
  height:var(--topbar-h);
  display:flex; justify-content:space-between; align-items:center;
  padding:0 16px;
  border-bottom:1px solid rgba(51,255,102,.25);
  background:rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  font-size:12px;
  color:var(--green-dim);
  z-index:10;
  letter-spacing:.04em;
  padding-top:env(safe-area-inset-top, 0);
  height:calc(var(--topbar-h) + env(safe-area-inset-top, 0));
}
.topbar .left, .topbar .right{display:flex; gap:18px; align-items:center; min-width:0;}
.topbar b{color:var(--green); font-weight:500;}
.topbar .hide-sm{ display:inline; }
.dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  background:var(--green); box-shadow:0 0 6px var(--green);
  margin-right:6px;
  animation: pulse 1.6s infinite ease-in-out;
}
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.35} }

/* Layout */
.stage{
  position:fixed;
  top:calc(var(--topbar-h) + env(safe-area-inset-top, 0));
  left:0; right:0;
  bottom:calc(var(--botbar-h) + env(safe-area-inset-bottom, 0));
  display:grid;
  grid-template-columns: 1fr 380px;
  gap:1px;
  background: rgba(51,255,102,.18);
}
.pane{ background:#000; padding:14px 18px; overflow:hidden; position:relative; min-height:0; min-width:0; }
.pane h2{
  font-size:11px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--green-dim); margin:0 0 10px 0; font-weight:500;
  border-bottom:1px dashed rgba(51,255,102,.25);
  padding-bottom:6px;
}

/* Main log */
.pane.main{ display:flex; flex-direction:column; }
#log{
  flex:1; min-height:0;
  overflow:hidden;
  white-space:pre-wrap;
  word-break:break-word;
}
#log .line{ display:block; }
.tx .ts{ color:var(--gray); }
.tx .ok{ color:var(--green-bright); }
.tx .warn{ color:var(--amber); }
.tx .err{ color:var(--red); }
.tx .dim{ color:var(--green-dim); }
.tx .arrow{ color:var(--green-bright); }
.tx .path{ color:#9af0a8; }
.tx .num{ color:#a6ffb8; }

/* Right side stacks */
.side{
  display:grid;
  grid-template-rows: auto auto 1fr auto;
  gap:1px;
  background: rgba(51,255,102,.18);
  min-height:0;
}
.side > .pane{ padding:12px 14px; }

/* Quote block */
.quote{
  border:1px solid rgba(51,255,102,.35);
  padding:14px 16px;
  position:relative;
  min-height:170px;
}
.quote .corner{
  position:absolute; width:10px; height:10px;
  border-color:var(--green);
}
.quote .corner.tl{ top:-1px; left:-1px; border-top:2px solid; border-left:2px solid;}
.quote .corner.tr{ top:-1px; right:-1px; border-top:2px solid; border-right:2px solid;}
.quote .corner.bl{ bottom:-1px; left:-1px; border-bottom:2px solid; border-left:2px solid;}
.quote .corner.br{ bottom:-1px; right:-1px; border-bottom:2px solid; border-right:2px solid;}
.quote .label{ font-size:10px; color:var(--green-dim); letter-spacing:.2em; text-transform:uppercase; margin-bottom:10px;}
.quote .text{ font-size:15px; color:var(--green-bright); line-height:1.5; min-height:96px;}
.quote .author{ margin-top:12px; font-size:12px; color:var(--green-dim); }
.quote .author b{ color:var(--green); font-weight:500;}

/* meters */
.meters .row{
  display:grid; grid-template-columns: 64px 1fr 56px;
  gap:10px; align-items:center; font-size:12px; margin-bottom:6px;
}
.meters .lbl{ color:var(--green-dim); }
.meters .bar{
  background:rgba(51,255,102,.12); height:10px; position:relative; overflow:hidden;
  border:1px solid rgba(51,255,102,.25);
}
.meters .bar > i{
  display:block; height:100%; background:var(--green);
  box-shadow: 0 0 6px var(--green);
  transition: width .6s ease;
}
.meters .val{ text-align:right; color:var(--green-bright); font-variant-numeric: tabular-nums;}

/* Process table */
.ps{ font-size:12px; }
.ps .head, .ps .row{
  display:grid; grid-template-columns: 50px 1fr 60px 60px;
  gap:8px;
}
.ps .head{ color:var(--green-dim); border-bottom:1px dashed rgba(51,255,102,.25); padding-bottom:4px; margin-bottom:4px;}
.ps .row{ padding:2px 0; }
.ps .row .name{ color:var(--green-bright); }
.ps .row .num{ color:var(--green); font-variant-numeric: tabular-nums; text-align:right;}
.ps .row.dim .name{ color:var(--green-dim);}

/* ASCII art */
pre.ascii{
  margin:0;
  color:var(--green);
  font-size:10px;
  line-height:1.05;
  white-space:pre;
  text-shadow:0 0 4px rgba(51,255,102,.5);
}

/* Bottom bar */
.botbar{
  position:fixed; bottom:0; left:0; right:0;
  height:calc(var(--botbar-h) + env(safe-area-inset-bottom, 0));
  padding-bottom:env(safe-area-inset-bottom, 0);
  display:flex; align-items:center; gap:0;
  background:#000;
  border-top:1px solid rgba(51,255,102,.25);
  font-size:11px;
  color:var(--green-dim);
  z-index:10;
  letter-spacing:.05em;
  overflow:hidden;
}
.botbar .seg{
  padding:0 12px; height:var(--botbar-h); display:flex; align-items:center;
  border-right:1px solid rgba(51,255,102,.18);
  white-space:nowrap;
}
.botbar .seg.active{ background:var(--green); color:#000; text-shadow:none; }
.botbar .spacer{ flex:1; }
.botbar .blink{ animation: blink 1s steps(2) infinite; }
@keyframes blink{ 50%{opacity:0} }

/* Cursor */
.cursor{
  display:inline-block; width:8px; height:14px; vertical-align:-2px;
  background:var(--green);
  box-shadow:0 0 8px var(--green);
  animation: blink 1.05s steps(2) infinite;
  margin-left:2px;
}

/* Boot screen */
#boot{
  position:fixed; inset:0; background:#000; z-index:30;
  padding:32px 40px;
  overflow:hidden;
}
#boot pre{
  color:var(--green); font-size:12px; line-height:1.4;
  margin:0; white-space:pre-wrap;
}
#boot.fade{ animation: bootfade .6s forwards; }
@keyframes bootfade{ to{opacity:0; visibility:hidden;} }

/* ============ MOBILE / TABLET ============ */
@media (max-width: 900px){
  :root{ --topbar-h: 30px; --botbar-h: 22px; }
  body{ font-size:13px; }
  .topbar{ font-size:11px; padding:0 10px; }
  .topbar .left, .topbar .right{ gap:10px; }
  .topbar .hide-sm{ display:none; }
  .stage{
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  /* Hide side meters/procs/ascii on mobile — keep only log + quote */
  .side{
    grid-template-rows: auto;
    max-height: 44vh;
  }
  .side > .pane:nth-child(n+2){ display:none; }
  .pane{ padding:10px 12px; }
  .pane h2{ font-size:10px; margin-bottom:8px; }
  .quote{ min-height:0; padding:12px 14px; }
  .quote .text{ font-size:14px; min-height:60px; }
  .botbar{ font-size:10px; }
  .botbar .seg{ padding:0 8px; }
  .botbar .seg.hide-sm{ display:none; }
  #boot{ padding:18px 14px; }
  #boot pre{ font-size:10.5px; }
}

@media (max-width: 480px){
  body{ font-size:12px; }
  .topbar{ font-size:10px; padding:0 8px; }
  .topbar .left, .topbar .right{ gap:8px; }
  #log{ font-size:11px; line-height:1.4; }
  .pane h2{ font-size:9px; letter-spacing:.15em; }
  .quote .text{ font-size:13px; }
  .botbar .seg{ padding:0 6px; }
}

/* very narrow phones – trim more */
@media (max-width: 360px){
  .topbar .uptime, .topbar .load { display:none; }
}

/* =============================================================
   Shell-Prompt, App-Ansicht, App-Auswahl
   ============================================================= */

#prompt{
  display:flex; align-items:center; gap:8px;
  border-top:1px dashed rgba(51,255,102,.25);
  padding-top:8px; margin-top:6px;
}
.ps1{ color:var(--green-bright); white-space:nowrap; }
.ps1 .dim{ color:var(--green-dim); }
.cli-input{
  flex:1; min-width:0;
  background:transparent; border:0; outline:0;
  color:var(--green-bright); caret-color:var(--green);
  font:inherit; text-shadow:inherit;
  padding:0;
}
.cli-input::placeholder{ color:var(--green-dim); opacity:.7; }

#app{ display:none; flex:1; min-height:0; position:relative; }
body.app-on #log, body.app-on #prompt{ display:none; }
body.app-on #app{ display:flex; flex-direction:column; }

.app-bar{
  display:flex; gap:18px; flex-wrap:wrap;
  font-size:12px; color:var(--green-dim);
  padding-bottom:8px; margin-bottom:8px;
  border-bottom:1px dashed rgba(51,255,102,.25);
}
.app-bar b{ color:var(--green-bright); font-weight:500; }
.app-bar .right{ margin-left:auto; }
.app-body{ flex:1; min-height:0; position:relative; display:flex; align-items:center; justify-content:center; }
.app-canvas{ display:block; max-width:100%; max-height:100%; }
.app-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; gap:6px;
  background:rgba(0,0,0,.72); white-space:pre;
}
.app-overlay[hidden]{ display:none; }
.app-overlay .big{ font-size:22px; color:var(--green-bright); letter-spacing:.2em; }

/* App-Auswahl (ls /usr/local/oeapp/bin) */
.menu{ overflow:auto; min-height:0; }
.menu .cmd{ color:var(--green-dim); margin-bottom:10px; }
.menu .item{
  display:grid; grid-template-columns: 18px 110px 1fr;
  gap:8px; padding:3px 6px; cursor:pointer;
}
.menu .item .name{ color:var(--green-bright); }
.menu .item .desc{ color:var(--green-dim); }
.menu .item.sel, .menu .item:hover{ background:var(--green); color:#000; text-shadow:none; }
.menu .item.sel *, .menu .item:hover *{ color:#000; }
.menu .hint{ margin-top:14px; color:var(--green-dim); font-size:12px; }

/* Touch-Steuerung für Spiele */
.pad{ display:none; gap:8px; justify-content:center; padding-top:10px; flex-wrap:wrap; }
.touch .pad{ display:flex; }
.pad button{
  font:inherit; font-size:18px; min-width:58px; height:48px;
  background:#000; color:var(--green); border:1px solid rgba(51,255,102,.5);
  text-shadow:inherit; touch-action:manipulation;
}
.pad button:active{ background:var(--green); color:#000; }

.botbar .seg[data-go]{ cursor:pointer; }
.botbar .seg[data-go]:hover{ color:var(--green-bright); }

/* Text-Apps (fsociety, swan): Ausgabe + eigene Eingabezeile */
.tty{ flex:1; min-height:0; overflow:auto; white-space:pre-wrap; word-break:break-word; }
.tty-in{ display:flex; gap:8px; align-items:center; padding-top:6px; }

@media (max-width: 900px){
  /* Apps brauchen Platz: Zitat-Box ausblenden, solange eine App läuft */
  body.app-on .stage{ grid-template-rows: 1fr; }
  body.app-on .side{ display:none; }
  .menu .item{ grid-template-columns: 14px 84px 1fr; }
}

/* swan: großer Zähler */
.swan-clock{
  font-size:clamp(44px, 11vw, 110px); font-weight:600; letter-spacing:.06em;
  text-align:center; color:var(--green-bright); padding:6px 0 12px;
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 10px rgba(51,255,102,.8), 0 0 30px rgba(51,255,102,.35);
  font-family:"IBM Plex Mono", ui-monospace, "Noto Sans Egyptian Hieroglyphs", monospace;
}
.swan-clock.warn{ color:var(--amber); text-shadow:0 0 12px rgba(255,180,84,.8); }
.swan-clock.crit{ color:var(--red); text-shadow:0 0 14px rgba(255,90,90,.9); animation:blink 1s steps(2) infinite; }

/* atm: Atari Portfolio, nur das Gerät mit seinem 40×8-LCD */
.pf-wrap{ flex:1; min-height:0; display:flex; align-items:center; justify-content:center; overflow:auto; }
.pf{
  --fs:14px;
  width:calc(var(--fs) * 24 + 58px); max-width:100%;
  background:linear-gradient(#45484b, #2b2d2f 60%, #232527); border-radius:10px;
  padding:12px 14px 14px; text-shadow:none;
  box-shadow:0 0 0 1px #5d6064, inset 0 1px 0 rgba(255,255,255,.12), 0 14px 40px rgba(0,0,0,.7);
}
.pf-top{ display:flex; align-items:baseline; gap:10px; margin:0 4px 8px; }
.pf-brand{ font-size:11px; font-weight:600; letter-spacing:.35em; color:#d9dcdf; }
.pf-model{ font-size:11px; font-style:italic; letter-spacing:.08em; color:#9a9fa4; }
.pf-lcd{
  position:relative; border:7px solid #151617; border-radius:3px; padding:8px 8px 7px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 40% 30%, #b3bea3, #98a58a 75%, #8a967c);
  box-shadow:inset 0 0 22px rgba(0,0,0,.4), inset 0 2px 4px rgba(0,0,0,.5);
}
.pf-screen{
  margin:0; font-size:var(--fs); line-height:1.22; white-space:pre; overflow:hidden;
  color:#18210f; height:calc(8 * 1.22em);
  text-shadow:1px 1px 0 rgba(24,33,15,.18);          /* LCD-Schatten der Pixel */
}
.pf-cur{ background:#18210f; color:#a8b398; text-shadow:none; }
.pf-big{
  position:absolute; inset:8px; display:flex; align-items:center; justify-content:center; text-align:center;
  font-size:calc(var(--fs) * 3.1); line-height:1.05; font-weight:600; letter-spacing:.12em;
  color:#a8b398; background:#18210f; animation:pf-inv 1.1s step-end infinite;
}
.pf-big[hidden]{ display:none; }
@keyframes pf-inv{ 50%{ background:#a3ae94; color:#18210f; } }
.pf-kb{ margin-top:12px; display:flex; flex-direction:column; gap:4px; align-items:center; }
.pf-row{ display:flex; gap:4px; justify-content:center; width:100%; }
.pf-kb i{
  flex:0 1 calc(var(--fs) * 1.9); height:calc(var(--fs) * 1.5); min-width:0;
  display:flex; align-items:center; justify-content:center;
  font-style:normal; font-size:calc(var(--fs) * .62); color:#c4c7ca;
  background:linear-gradient(#26282a, #161718); border-radius:3px;
  box-shadow:0 1px 0 #000, inset 0 1px 0 rgba(255,255,255,.08);
  transition:background .12s, color .12s;
}
.pf-kb i.wide{ flex-basis:calc(var(--fs) * 9); }
.pf-kb i.ent{ flex-basis:calc(var(--fs) * 3); }
.pf-kb i.on{ background:#5a5e62; color:#fff; transform:translateY(1px); box-shadow:none; transition:none; }
.atm-hint{ text-align:center; font-size:12px; min-height:1.4em; padding-top:6px; }

/* exit: Bild zerfällt, danach nur noch der Cursor */
.shatter{ position:fixed; inset:0; z-index:45; pointer-events:none; overflow:hidden; background:#000; }
.shard{ position:absolute; overflow:hidden; will-change:transform; }
/* in den Kopien nichts animieren — sonst muss jede Kachel jedes Bild neu gemalt werden */
.shatter *{ animation:none !important; transition:none !important; }
.shard-inner{ position:absolute; left:0; top:0; }
.halt{ position:fixed; inset:0; z-index:45; background:#000; padding:14px 16px; }
.halt .cursor{ width:10px; height:18px; }

/* =============================================================
   video: DOS-Kassensystem (Blau wie 1994, VGA-Farben)
   ============================================================= */
.dos{
  --d-bg:#0000aa; --d-fg:#c0c0c0; --d-hi:#ffffff; --d-cy:#00aaaa; --d-ye:#ffff55; --d-re:#ff5555; --d-gr:#55ff55;
  flex:1; min-height:0; display:flex; flex-direction:column;
  background:var(--d-bg); color:var(--d-fg); text-shadow:0 0 1px rgba(255,255,255,.25);
  font-size:13px; line-height:1.35; border:2px solid #000; box-shadow:0 0 0 1px var(--d-cy);
}
.dos b{ color:var(--d-hi); font-weight:600; }
.dos .dim{ color:#7f86c7; }
.dos .ok{ color:var(--d-gr); }
.dos .warn{ color:var(--d-ye); }
.dos .err{ color:var(--d-re); }
.dos-head{ display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; background:var(--d-cy); color:#000; padding:2px 10px; font-weight:600; text-shadow:none; }
.dos-main{ flex:1; min-height:0; overflow:auto; padding:12px; }
.dos-msg{ background:#000080; color:var(--d-ye); padding:2px 10px; border-top:1px solid var(--d-cy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dos-msg.ok{ color:var(--d-gr); } .dos-msg.err{ color:var(--d-re); } .dos-msg.warn{ color:var(--d-ye); }
.dos-keys{ display:flex; flex-wrap:wrap; background:#000; }
.dos-key{ font:inherit; font-size:12px; background:#000; color:var(--d-cy); border:0; padding:3px 8px; cursor:pointer; text-shadow:none; }
.dos-key b{ color:var(--d-hi); margin-right:4px; }
.dos-key:hover{ background:var(--d-cy); color:#000; }
.dos-key.off{ opacity:.4; cursor:default; }
.dos-box{ border:3px double var(--d-fg); padding:10px 12px 12px; margin:6px 0 14px; position:relative; min-width:0; }
.dos-box-t{ position:absolute; top:-0.8em; left:12px; background:var(--d-bg); color:var(--d-hi); padding:0 6px; font-weight:600; }
.dos-box.narrow{ max-width:560px; }
.dos-cols{ display:flex; gap:14px; flex-wrap:wrap; align-items:flex-start; }
.dos-cols > .dos-box{ flex:1 1 360px; }
.dos-cols > .dos-box.dos-side{ flex:0 1 auto; }
.dos-f{ display:flex; align-items:center; gap:10px; margin:6px 0; }
.dos-f > span{ min-width:150px; color:var(--d-hi); }
.dos-in{
  font:inherit; color:#000; background:var(--d-cy); border:0; outline:0; padding:1px 6px;
  flex:1; max-width:340px; min-width:0; text-shadow:none; caret-color:#000;
}
.dos-in:focus{ background:#55ffff; }
.dos-in::placeholder{ color:#005f5f; }
.dos-hint{ color:#7f86c7; font-size:12px; margin-top:8px; }
.dos-pre{ margin:6px 0 0; white-space:pre; overflow-x:auto; font:inherit; }
.dos-big{ font-size:20px; color:var(--d-ye); }
.dos-th{ color:var(--d-hi); text-decoration:underline; }
.dos-row{ cursor:pointer; }
.dos-row:hover{ background:var(--d-cy); color:#000; }
.dos-sum{ color:var(--d-hi); }
.dos-menu .dos-item{ padding:1px 6px; cursor:pointer; white-space:pre; }
.dos-menu .dos-item b{ color:var(--d-ye); margin-right:6px; }
.dos-menu .dos-item.sel, .dos-menu .dos-item:hover{ background:var(--d-fg); color:#000; }
.dos-menu .dos-item.sel b, .dos-menu .dos-item:hover b, .dos-menu .dos-item.sel .dim{ color:#000; }
.dos-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.dos-btn{ font:inherit; background:var(--d-fg); color:#000; border:0; padding:2px 10px; cursor:pointer; box-shadow:3px 3px 0 #000; text-shadow:none; }
.dos-btn b{ color:#aa0000; }
.dos-btn:active{ transform:translate(2px,2px); box-shadow:1px 1px 0 #000; }
.dos-center{ display:flex; flex-direction:column; align-items:center; gap:4px; }
.dos-logo{ margin:0; color:var(--d-cy); line-height:1.15; }
.dos-title{ font-size:28px; font-weight:600; letter-spacing:.3em; color:var(--d-ye); }
.dos-sub{ color:#7f86c7; font-size:12px; margin-bottom:12px; text-align:center; }
.dos-card{ margin:0; color:var(--d-ye); line-height:1.2; }
.drawer-wrap{ overflow:hidden; padding:10px 0 30px; }
.drawer{ margin:0; color:var(--d-fg); transition:transform .25s cubic-bezier(.2,1.6,.4,1); }
.drawer.open{ transform:translateY(22px); color:var(--d-ye); }
.receipt-wrap{ display:flex; flex-direction:column; align-items:center; }
.receipt{
  margin:0; background:#f4f1e6; color:#222; text-shadow:none; padding:14px 16px; width:max-content; max-width:100%;
  font-size:12px; line-height:1.3; white-space:pre; overflow:auto; max-height:60vh;
  box-shadow:0 6px 18px rgba(0,0,0,.6); border-top:6px dashed #f4f1e6;
}
@media (max-width: 600px){
  .dos{ font-size:11px; }
  .dos-f{ flex-direction:column; align-items:stretch; gap:2px; }
  .dos-f > span{ min-width:0; }
  .dos-in{ max-width:none; font-size:16px; }   /* 16px: iOS zoomt sonst beim Fokussieren */
  .dos-title{ font-size:20px; }
  .dos-logo{ font-size:9px; }
  .dos-main{ padding:8px; }
}

/* =============================================================
   Touch-Geräte (Handy/Tablet), Klasse .touch setzt core.js
   ============================================================= */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.touch{
  --botbar-h: 42px;
  -webkit-user-select:none; user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;          /* kein Doppeltipp-Zoom */
  overscroll-behavior:none;
}
.touch input, .touch textarea{ -webkit-user-select:text; user-select:text; }
/* unter 16px zoomt iOS beim Antippen eines Eingabefelds hinein */
.touch .cli-input, .touch .dos-in{ font-size:16px; }

/* Layout folgt dem sichtbaren Bereich (Bildschirmtastatur), Werte setzt core.js */
.vv .topbar{ top:var(--vvt, 0px); }
.vv .stage{
  top:calc(var(--vvt, 0px) + var(--topbar-h) + env(safe-area-inset-top, 0px));
  bottom:auto;
  height:calc(var(--vvh, 100%) - var(--topbar-h) - env(safe-area-inset-top, 0px) - var(--botbar-h) - env(safe-area-inset-bottom, 0px));
}
.vv .botbar{ bottom:auto; top:calc(var(--vvt, 0px) + var(--vvh, 100%) - var(--botbar-h) - env(safe-area-inset-bottom, 0px)); }
/* Tastatur offen: Fußleiste weg, die Fläche gehört der Eingabe */
.vv.kbd .botbar{ display:none; }
.vv.kbd .stage{ height:calc(var(--vvh, 100%) - var(--topbar-h) - env(safe-area-inset-top, 0px)); }

/* Fußleiste: große Tippflächen */
.touch .botbar{ font-size:13px; }
.touch .botbar .seg{ padding:0 16px; }
.touch .botbar .seg[data-go]{ min-width:84px; justify-content:center; }

/* Ohne Flackern und Scanline-Überblendung: kostet auf dem Handy pro Bild die ganze Seite */
.touch.app-on{ animation:none; }
.touch.app-on::before{ display:none; }

/* App-Auswahl: Zeilen groß genug für Finger */
.touch .menu{ -webkit-overflow-scrolling:touch; }
.touch .menu .item{ padding:9px 6px; align-items:center; }
.touch .menu .item:hover:not(.sel){ background:none; color:inherit; text-shadow:inherit; }
.touch .menu .item:hover:not(.sel) .name{ color:var(--green-bright); }
.touch .menu .item:hover:not(.sel) .desc{ color:var(--green-dim); }
.touch .menu .hint{ display:none; }

/* Spieltasten: volle Breite, groß, mehrere Finger gleichzeitig (Lenken + Bremsen) */
.touch .pad{
  flex-wrap:nowrap; gap:6px; padding-top:8px;
  width:100%; max-width:560px; margin:0 auto;
}
.touch .pad button{
  flex:1 1 0; min-width:0; height:58px; font-size:22px;
  touch-action:none; border-radius:4px;
}
/* Tastenkürzel-Hinweise in Statuszeilen helfen auf dem Handy nicht */
.touch .app-bar{ gap:10px; font-size:11px; }
.touch .app-bar .right{ display:none; }

/* Querformat auf dem Handy: Tasten seitlich wäre schöner, flach halten reicht */
@media (pointer:coarse) and (max-height:500px){
  .touch .pad button{ height:44px; }
  .touch .app-bar{ display:none; }
}
.vv.kbd .side{ display:none; }
.vv.kbd .stage{ grid-template-rows:1fr; }
.touch .pad button{ white-space:nowrap; overflow:hidden; }

/* Tipp-Menü der Text-Apps (fsociety, swan): Befehle als Knöpfe wie bei Telegram */
.tty-chips{ display:flex; flex-wrap:wrap; gap:6px; padding-top:8px; }
.tty-chips[hidden]{ display:none; }
.tty-chips-head{ width:100%; font-size:11px; color:var(--green-dim); letter-spacing:.05em; }
.tty-chips button{
  font:inherit; font-size:12px; background:#000; color:var(--green-bright); text-shadow:inherit;
  border:1px solid rgba(51,255,102,.45); border-radius:6px; padding:4px 10px; cursor:pointer;
}
.tty-chips button:hover:not(:disabled){ background:rgba(51,255,102,.12); }
.tty-chips button:active:not(:disabled){ background:var(--green); color:#000; text-shadow:none; }
.tty-chips button.aux{ color:var(--green-dim); border-style:dashed; }
.tty-chips button:disabled{ opacity:.35; cursor:default; }
.touch .tty-chips button{ flex:1 1 30%; min-height:44px; padding:6px 4px; font-size:14px; }
.tty-touch .tty-in{ display:none; }
.tty-touch.kb .tty-in{ display:flex; }

/* video auf dem Handy: Listenzeilen und Knöpfe groß genug zum Antippen */
.touch .dos-table{ line-height:2.3; }
.touch .dos-row{ display:inline-block; width:100%; }
.touch .dos-btn{ padding:8px 12px; }
.touch .dos-key{ padding:8px 9px; }
.touch .dos-menu .dos-item{ padding:8px 6px; }
.dos-actions .dos-btn{ cursor:pointer; }

/* life: Erklärung mit Computerstimme, Text läuft oben mit */
.life-say{
  position:absolute; left:8px; right:8px; top:8px; z-index:2;
  background:rgba(0,0,0,.86); border:1px solid rgba(51,255,102,.5); padding:8px 12px 10px;
  box-shadow:0 0 18px rgba(51,255,102,.15); cursor:pointer;
}
.life-say[hidden]{ display:none; }
.life-say-h{ font-size:11px; color:var(--green-dim); letter-spacing:.08em; margin-bottom:4px; }
.life-say-h .dim{ color:var(--green-dim); opacity:.7; }
.life-say-t{ color:var(--green-bright); font-size:15px; line-height:1.45; min-height:4.35em; }
@media (max-width:480px){ .life-say-t{ font-size:14px; } }

/* matrix: grobe Pixel, leicht weich und leuchtend wie auf einem alten Monitor */
.matrix-cv{ image-rendering:pixelated; filter:blur(.45px) brightness(1.2); }

/* Musik-Schalter in der Fußleiste */
.botbar .music-seg{ cursor:pointer; }
.botbar .music-seg b{ color:var(--green-dim); font-weight:500; }
.botbar .music-seg.on b{ color:var(--green-bright); }
.botbar .music-seg:hover{ color:var(--green-bright); }
