* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background:
    radial-gradient(ellipse 90% 70% at 20% 10%, rgba(70, 40, 120, 0.25), transparent 60%),
    radial-gradient(ellipse 80% 60% at 85% 85%, rgba(160, 60, 30, 0.18), transparent 60%),
    radial-gradient(ellipse at center, #1a1a2e 0%, #0b0b13 100%);
  color: #e8e8f0;
  font-family: "Segoe UI", Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

#wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
}

#game-area {
  position: relative;
}

#board {
  background:
    linear-gradient(180deg, rgba(60, 60, 110, 0.10), rgba(0, 0, 0, 0) 30%),
    #0a0a12;
  border: 3px solid #3a3a5c;
  border-radius: 6px;
  display: block;
  animation: boardGlow 3.2s ease-in-out infinite;
}

@keyframes boardGlow {
  0%, 100% {
    box-shadow: 0 0 26px rgba(90, 80, 180, 0.28), inset 0 0 60px rgba(0, 0, 0, 0.5);
    border-color: #3a3a5c;
  }
  50% {
    box-shadow: 0 0 46px rgba(130, 95, 225, 0.48), inset 0 0 60px rgba(0, 0, 0, 0.5);
    border-color: #4c4c78;
  }
}

#overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 16, 0.82);
  backdrop-filter: blur(3px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
}

#overlay.hidden { display: none; }

#overlay-content { padding: 14px; width: 100%; }

#overlay h1 {
  font-size: 34px;
  letter-spacing: 4px;
  background: linear-gradient(120deg, #ffd05f, #ff7838, #ffd05f, #e05528);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 14px rgba(255, 130, 50, 0.45));
  animation: titleShift 4s ease-in-out infinite, titleFloat 3s ease-in-out infinite;
}

@keyframes titleShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#overlay-text {
  font-size: 15px;
  color: #b8b8d0;
  margin-bottom: 10px;
  white-space: pre-line;
}

#overlay-controls {
  margin: 0 auto 10px;
  max-width: 280px;
  text-align: left;
  font-size: 12px;
  color: #9a9ab8;
}

#overlay-controls h3 {
  color: #d0d0e8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 8px 0 3px;
  border-bottom: 1px solid #33334f;
}

#overlay-controls table { width: 100%; border-collapse: collapse; }
#overlay-controls td { padding: 1px 4px; }
#overlay-controls td:first-child { color: #e8c437; width: 45%; }

#overlay-prompt {
  font-size: 15px;
  color: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 150px;
}

.panel-box {
  background: linear-gradient(180deg, rgba(42, 42, 72, 0.85), rgba(24, 24, 42, 0.85));
  border: 2px solid #3a3a5c;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.panel-box h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8888aa;
  margin-bottom: 6px;
}

.stat {
  font-size: 22px;
  font-weight: bold;
  color: #ffd05f;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 208, 95, 0.35);
}

.stat.bump {
  animation: bump 0.28s ease-out;
}

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); color: #fff0c0; }
  100% { transform: scale(1); }
}

#next {
  display: block;
  margin: 0 auto;
  background: #0a0a12;
  border-radius: 4px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
  animation: nextFloat 2.8s ease-in-out infinite;
}

@keyframes nextFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

#gamepad-status {
  font-size: 12px;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  border: 2px solid #3a3a5c;
  background: rgba(30, 30, 52, 0.8);
  color: #777;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

#gamepad-status.on {
  color: #6fe06f;
  border-color: #2e6b2e;
  box-shadow: 0 0 12px rgba(80, 200, 80, 0.25);
}

/* ---------- Menüs ---------- */

#overlay-static.hidden, #overlay-menu.hidden { display: none; }

#overlay-content {
  max-height: 540px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.menu-title {
  font-size: 26px;
  letter-spacing: 3px;
  background: linear-gradient(120deg, #ffd05f, #ff7838, #ffd05f, #e05528);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  animation: titleShift 4s ease-in-out infinite;
}

.menu-title.big { font-size: 34px; filter: drop-shadow(0 0 14px rgba(255,130,50,0.45)); }

.menu-hint {
  font-size: 12px;
  color: #9a9ab8;
  margin-bottom: 10px;
  min-height: 15px;
}

.menu-list { margin: 6px auto 10px; max-width: 240px; }
.menu-list.compact .menu-item { padding: 4px 10px; font-size: 14px; }

.menu-item {
  padding: 8px 12px;
  margin: 3px 0;
  font-size: 17px;
  color: #c8c8e0;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
}

.menu-item:hover { color: #fff; }

.menu-item.sel {
  color: #ffd05f;
  background: rgba(255, 200, 90, 0.10);
  border-color: rgba(255, 200, 90, 0.4);
  text-shadow: 0 0 10px rgba(255, 208, 95, 0.5);
}

.menu-controls {
  margin: 6px auto;
  max-width: 300px;
  font-size: 11px;
  color: #8888a8;
}
.menu-controls table { width: 100%; border-collapse: collapse; }
.menu-controls td { padding: 1px 5px; text-align: left; }
.menu-controls td:nth-child(odd) { color: #d8b84f; }

.menu-foot {
  font-size: 11px;
  color: #66668a;
  margin-top: 10px;
}

/* ---------- Mehrspieler-Lobby ---------- */

.nick-row { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }

#nick-input {
  background: #14141f;
  border: 2px solid #3a3a5c;
  color: #e8e8f0;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 14px;
  width: 150px;
  outline: none;
}
#nick-input:focus { border-color: #ffd05f; }

.mp-btn {
  background: linear-gradient(180deg, #4a4a78, #34345a);
  border: 1px solid #5c5c8c;
  color: #f0f0ff;
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.mp-btn:hover { background: linear-gradient(180deg, #5a5a90, #40406a); }
.mp-btn-small { padding: 2px 8px; font-size: 10px; }
.mp-btn-dark { background: #26263c; border-color: #3a3a5c; }

.mp-section {
  margin: 10px auto;
  max-width: 280px;
  text-align: left;
}
.mp-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8888aa;
  border-bottom: 1px solid #33334f;
  margin-bottom: 5px;
}

.mp-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px;
  font-size: 13px;
  color: #d0d0e8;
}
.mp-player small { color: #7777a0; }
.mp-ingame { font-size: 11px; color: #c08a4a; }

.mp-challenge {
  background: rgba(255, 150, 60, 0.12);
  border: 1px solid rgba(255, 150, 60, 0.4);
  border-radius: 5px;
  padding: 7px;
  font-size: 12px;
  margin: 4px 0;
  animation: pulse 1.6s ease-in-out infinite;
}

.mp-error { color: #ff7a6a; font-size: 12px; margin: 6px 0; }
.mp-status { color: #7fd0ff; font-size: 12px; margin: 6px 0; }
.mp-empty { font-size: 11px; color: #8888a8; line-height: 1.6; }

.mp-leader { width: 100%; border-collapse: collapse; font-size: 12px; }
.mp-leader th {
  text-align: left; color: #7777a0; font-weight: normal;
  font-size: 10px; padding: 2px 4px;
}
.mp-leader td { padding: 2px 4px; color: #c8c8e0; }
.mp-leader tr.me td { color: #ffd05f; }

/* Störreihen-Anzeige links neben dem Spielfeld (Duell) */
#garbage-meter {
  position: absolute;
  left: -15px; top: 3px; bottom: 3px;
  width: 9px;
  border-radius: 4px;
  background: rgba(20, 20, 34, 0.9);
  border: 1px solid #33334f;
  display: flex;
  flex-direction: column-reverse;
  overflow: visible;
}
#garbage-meter .gm-ready,
#garbage-meter .gm-wait {
  width: 100%;
  height: 0;
  transition: height 0.25s ease-out;
}
#garbage-meter .gm-wait {
  background: linear-gradient(180deg, #ffd05f, #ff9a3a);
  box-shadow: 0 0 8px rgba(255, 170, 60, 0.6);
}
#garbage-meter .gm-ready {
  background: linear-gradient(180deg, #ff6a5a, #c0281c);
  border-radius: 0 0 3px 3px;
}
#garbage-meter.armed .gm-ready { animation: meterAlarm 0.35s ease-in-out infinite alternate; }
@keyframes meterAlarm {
  from { box-shadow: 0 0 4px rgba(255, 60, 40, 0.5); filter: brightness(1); }
  to { box-shadow: 0 0 14px rgba(255, 60, 40, 1); filter: brightness(1.35); }
}
#garbage-meter .gm-num {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -4px);
  font-size: 11px;
  font-weight: bold;
  color: #ffd05f;
  text-shadow: 0 0 6px #000, 0 0 3px #000;
  transition: bottom 0.25s ease-out;
}

#opp { display: block; margin: 0 auto 4px; background: #0a0a12; border-radius: 3px; }

/* ---------- 3D-Darstellung (render3d.js) ---------- */
#gl3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}
#wrapper { position: relative; z-index: 1; }
/* Das 2D-Feld bleibt als Platzhalter und Effekt-Leinwand, sichtbar ist die 3D-Szene */
#board.gl {
  opacity: 0;
  animation: none;
}
#next3d { display: block; margin: 0 auto; }
body:has(#gl3d) .panel-box {
  background: linear-gradient(180deg, rgba(30, 36, 48, 0.78), rgba(16, 19, 26, 0.82));
  border-color: #4a5468;
  backdrop-filter: blur(2px);
}
body:has(#gl3d) #overlay { background: rgba(8, 10, 16, 0.72); }

/* ---------- Handy / Tablet (body.touch, gesetzt in game.js) ---------- */
#touch-left, #touch-right, #touch-pause { display: none; }
body.touch {
  touch-action: none;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
body.touch #wrapper {
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  gap: 8px;
  justify-content: center;
  align-content: center;
  align-items: center;
  justify-items: center;
}
body.touch #board { touch-action: none; }
body.touch #gamepad-status,
body.touch .menu-controls,
body.touch .menu-foot { display: none; }
body.touch #overlay-content { max-height: 100%; overflow-y: auto; padding: 8px; }
body.touch #overlay { align-items: safe center; }

/* Knöpfe */
body.touch .touch-pad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body.touch #touch-left { grid-area: tl; }
body.touch #touch-right { grid-area: tr; }
.tb {
  font: bold 26px "Segoe UI", Verdana, sans-serif;
  color: #dff6ff;
  background: linear-gradient(180deg, rgba(52, 62, 80, 0.88), rgba(22, 27, 36, 0.92));
  border: 2px solid #4a6078;
  border-radius: 12px;
  box-shadow: 0 3px 0 #0b0e14, inset 0 1px 0 rgba(255, 255, 255, 0.12);
  min-width: 60px;
  height: 60px;
  touch-action: none;
  user-select: none;
  cursor: pointer;
}
.tb.wide { grid-column: span 2; }
.tb.drop { color: #ffd05f; border-color: #8a6a2a; }
.tb.down {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0b0e14, 0 0 14px rgba(64, 200, 255, 0.5);
  border-color: #40c8ff;
  background: linear-gradient(180deg, rgba(40, 90, 120, 0.95), rgba(20, 40, 56, 0.95));
}
body.touch #touch-pause {
  display: block;
  position: fixed;
  z-index: 20;
  top: calc(6px + env(safe-area-inset-top));
  right: calc(6px + env(safe-area-inset-right));
  min-width: 42px;
  height: 42px;
  font-size: 18px;
  padding: 0;
}
.touch-ov { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.touch-ov .menu-item {
  font: inherit;
  font-size: 17px;
  min-width: 170px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
body.touch #overlay-prompt { animation: none; }

/* Hochformat: Infozeile oben, Feld in der Mitte, Knöpfe unten */
@media (orientation: portrait) {
  body.touch #wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "panel panel" "game game" "tl tr";
    padding: calc(6px + env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));
    column-gap: 14px;
  }
  body.touch #game-area { grid-area: game; }
  body.touch #side-panel {
    grid-area: panel;
    flex-direction: row;
    width: auto;
    max-width: calc(100vw - 64px);
    margin-right: 48px;
    gap: 4px;
    justify-content: center;
  }
  body.touch .panel-box { padding: 3px 5px; min-width: 0; flex: 0 1 auto; }
  body.touch .panel-box h2 { font-size: 8px; letter-spacing: 0.5px; margin-bottom: 1px; white-space: nowrap; }
  body.touch .stat { font-size: 15px; }
  body.touch #next3d, body.touch #next { width: 44px !important; height: 44px !important; }
  body.touch #opp { width: 27px; height: 45px; }
  body.touch .touch-pad { width: 100%; max-width: 220px; }
  body.touch #touch-left { justify-self: start; }
  body.touch #touch-right { justify-self: end; }
}

/* Querformat: Steuerkreuz links, Feld, Infospalte und Knöpfe rechts */
@media (orientation: landscape) {
  body.touch #wrapper {
    grid-template-columns: auto auto auto auto;
    grid-template-areas: "tl game panel tr";
    padding: 6px calc(8px + env(safe-area-inset-right)) 6px calc(8px + env(safe-area-inset-left));
    column-gap: 22px;
  }
  body.touch #game-area { grid-area: game; }
  body.touch #side-panel { grid-area: panel; width: 88px; gap: 4px; align-self: center; }
  body.touch .panel-box { padding: 3px 4px; }
  body.touch .panel-box h2 { font-size: 8px; letter-spacing: 0.5px; margin-bottom: 1px; white-space: nowrap; }
  body.touch .stat { font-size: 15px; }
  body.touch #next3d, body.touch #next { width: 56px !important; height: 56px !important; }
  body.touch #opp { width: 42px; height: 70px; }
  body.touch .touch-pad { width: 140px; }
  body.touch #touch-right { padding-top: 40px; }
  body.touch #overlay h1 { font-size: 24px; }
  body.touch .menu-item { font-size: 14px; padding: 5px 8px; margin: 2px 0; }
  body.touch .menu-hint { font-size: 11px; }
}
body.touch #touch-left, body.touch #touch-right { display: grid; }
@media (orientation: landscape) {
  body.touch .menu-title.big { font-size: 26px; }
  body.touch .menu-title { font-size: 18px; }
}

/* Puzzle: Liste der weiteren Figuren + Levelauswahl als Raster */
#queue { display: block; margin: 6px auto 0; }
#hint-btn {
  display: block; margin: 8px auto 0; padding: 4px 8px; cursor: pointer; white-space: nowrap;
  font: bold 12px "Segoe UI", Verdana, sans-serif; color: #9effc0;
  background: rgba(90, 255, 150, 0.08); border: 1px solid rgba(90, 255, 150, 0.4); border-radius: 5px;
}
#hint-btn:hover { background: rgba(90, 255, 150, 0.18); }
#hint-btn.stuck { color: #ffb09a; background: rgba(255, 120, 90, 0.1); border-color: rgba(255, 120, 90, 0.45); }
@media (orientation: portrait) { body.touch #hint-btn { margin: 4px auto 0; padding: 3px 6px; font-size: 11px; } }
.pz-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-width: 260px; margin: 8px auto; }
.pz-grid .menu-item { margin: 0; padding: 6px 0; font-size: 15px; text-align: center; border: 1px solid rgba(255,255,255,0.12); position: relative; }
.pz-grid .menu-item.done { color: #7fe0a0; border-color: rgba(127,224,160,0.35); }
.pz-grid .menu-item.done::after { content: "✓"; position: absolute; top: -2px; right: 2px; font-size: 9px; }
.pz-grid .menu-item.sel { color: #ffd05f; }
.pz-info { min-height: 3.6em; font-size: 12px; color: #b8b8d0; margin: 4px auto; max-width: 260px; }
.pz-info b { color: #ffd05f; }
@media (orientation: portrait) { body.touch #queue { margin: 2px auto 0; } }

/* Hauptmenü: Sprachwahl + Links (Ko-fi, itch.io, eigene Seite) */
.lang-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 8px auto 4px; }
.lang-btn {
  font: bold 11px "Segoe UI", Verdana, sans-serif; letter-spacing: 1px; color: #9aa4b8; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 4px; padding: 3px 6px;
}
.lang-btn:hover { color: #fff; }
.lang-btn.on { color: #ffd05f; border-color: rgba(255, 208, 95, 0.6); background: rgba(255, 200, 90, 0.12); }
.promo { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 6px; font-size: 11px; }
.promo a { color: #8fd0ff; text-decoration: none; }
.promo a:hover { color: #fff; text-decoration: underline; }
.flag-at {
  display: inline-block; width: 15px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 1px;
  background: linear-gradient(#ed2939 0 33.3%, #fff 33.3% 66.6%, #ed2939 66.6%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}
@media (orientation: landscape) { body.touch .promo { font-size: 10px; gap: 1px; } }
/* Handy quer: wenig Höhe – Erklärtext im Hauptmenü weglassen, Abstände knapper */
@media (orientation: landscape) {
  body.touch .menu-title.big + .menu-hint { display: none; }
  body.touch .lang-row { margin: 4px auto 2px; }
}

/* Tutorial: Anleitung oben im Spielfeld */
#tut-box {
  /* unter den obersten Reihen, wo die neue Figur erscheint */
  position: absolute; left: 8px; right: 8px; top: 16%; z-index: 8;
  background: rgba(10, 14, 22, 0.88); border: 1px solid #4a6078; border-radius: 8px;
  padding: 8px 10px; color: #dfe8f4; font-size: 13px; line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
#tut-box .tut-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
#tut-box .tut-head b { color: #ffd05f; font-size: 14px; letter-spacing: 1px; }
#tut-box .tut-head span { color: #8fa3bd; font-size: 11px; }
#tut-box p { margin: 0 0 6px; }
#tut-box p b { color: #8fd0ff; }
#tut-box .tut-foot { display: flex; justify-content: space-between; }
#tut-box button {
  font: 12px "Segoe UI", Verdana, sans-serif; color: #9aa4b8; background: none; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px; padding: 2px 8px; cursor: pointer;
}
#tut-box button:hover { color: #fff; }
.menu-hint.tut-final { max-width: 280px; margin-left: auto; margin-right: auto; line-height: 1.45; }
body.touch #tut-box { font-size: 12px; padding: 6px 8px; }

/* Kompaktes Menü bei wenig Höhe (z. B. itch.io-Fenster 1024×640, kleine Laptop-Fenster) */
.promo { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 12px; }
@media (max-height: 780px) {
  #overlay-content { padding: 8px; }
  .menu-title.big { font-size: 28px; margin-bottom: 2px; }
  .menu-title { font-size: 22px; margin-bottom: 4px; }
  .menu-hint { font-size: 11px; margin-bottom: 4px; }
  .menu-list { margin: 4px auto 6px; }
  .menu-item { padding: 4px 10px; margin: 1px 0; font-size: 15px; }
  .menu-controls { font-size: 10px; margin-bottom: 4px; }
  .menu-foot { margin: 2px 0; font-size: 10px; }
  .lang-row { margin: 4px auto 2px; }
  .lang-btn { padding: 2px 5px; font-size: 10px; }
  .promo { font-size: 10px; margin-top: 3px; gap: 1px 10px; }
}
@media (max-height: 660px) {
  .menu-title.big + .menu-hint { display: none; }
  .menu-foot { display: none; }
}
@media (max-height: 520px) {
  .menu-controls { display: none; }
}
/* Menü darf so hoch sein wie das Spielfeld (vorher fest 540 px → unnötiges Scrollen) */
#overlay-content { max-height: 100%; }

/* Vollbild-Knopf oben links (am Handy gegenüber vom Pause-Knopf) */
#fs-btn {
  position: fixed; z-index: 20;
  top: calc(6px + env(safe-area-inset-top)); left: calc(6px + env(safe-area-inset-left));
  width: 38px; height: 38px; padding: 0;
  font: 20px/1 "Segoe UI Symbol", "Segoe UI", sans-serif; color: #dff6ff; cursor: pointer;
  background: linear-gradient(180deg, rgba(52, 62, 80, 0.85), rgba(22, 27, 36, 0.9));
  border: 1px solid #4a6078; border-radius: 9px; opacity: 0.75;
}
#fs-btn:hover, #fs-btn.on { opacity: 1; border-color: #40c8ff; }
body.touch #fs-btn { width: 42px; height: 42px; opacity: 0.9; }
/* Handy hochkant: links Platz für den Vollbild-Knopf, rechts für Pause → Reihen/Max. Kette weglassen */
@media (orientation: portrait) {
  body.touch #side-panel { margin-left: 48px; margin-right: 48px; max-width: calc(100vw - 104px); }
  body.touch .panel-box:has(#lines), body.touch .panel-box:has(#chain) { display: none; }
}
