/* Start screen (lobby browser), in-game menu and settings. public/js/lobby.js + settings.js.
   Look: Berlin night street, lit kebab-shop sign, cream cartoon panels like the in-game UI. */
@font-face {
  font-family: 'Bungee';
  src: url('/fonts/bungee.woff2') format('woff2');
  font-display: swap;
}
:root {
  --ink: #2b2b2b;
  --cream: #fff7e6;
  --cream-2: #f3e7cf;
  --orange: #e8541e;
  --orange-2: #ff7a3c;
  --neon: #ff5a1f;
  --yellow: #ffc93c;
  --green: #2f9e44;
  --red: #c0392b;
  --muted: #7a6a58;
  --sign-font: 'Bungee', 'Arial Black', 'Impact', sans-serif;
}

/* ---------------------------------------------------------------- start overlay */
#menu.start {
  position: fixed; inset: 0; z-index: 50; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  color: var(--cream);
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 110, 40, .22), transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(60, 90, 160, .25), transparent 70%),
    linear-gradient(180deg, rgba(16, 9, 7, .55) 0%, rgba(22, 11, 8, .72) 55%, rgba(10, 5, 4, .9) 100%);
}
@media (hover: hover) and (min-width: 900px) {
  #menu.start { backdrop-filter: blur(3px) saturate(1.15); -webkit-backdrop-filter: blur(3px) saturate(1.15); }
}
.start-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.start-bg::after { /* vignette */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .55) 100%);
}
.steam {
  position: absolute; bottom: -120px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 225, .16) 0%, rgba(255, 240, 225, 0) 65%);
  filter: blur(6px); animation: steam 14s linear infinite; opacity: 0;
}
.steam.s1 { left: 6%; animation-delay: 0s; }
.steam.s2 { left: 30%; animation-delay: -4s; width: 200px; height: 200px; }
.steam.s3 { left: 62%; animation-delay: -8s; }
.steam.s4 { left: 84%; animation-delay: -11s; width: 180px; height: 180px; }
@keyframes steam {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(40px, -115vh) scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .steam, .flicker, .sign-box, .spit-glow { animation: none !important; }
}

.start-wrap {
  position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ---------------------------------------------------------------- logo: lit shop sign */
.start-logo { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; user-select: none; -webkit-user-select: none; }
.spit { height: clamp(86px, 13vw, 160px); width: auto; flex: none; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.spit-glow { animation: heat 2.6s ease-in-out infinite alternate; transform-origin: center; }
@keyframes heat { from { opacity: .55; } to { opacity: 1; } }
.sign { display: flex; flex-direction: column; align-items: center; }
.sign-neon {
  font-family: var(--sign-font); font-size: clamp(50px, 9.5vw, 116px); line-height: .92; letter-spacing: .03em; color: #fff3e2;
  text-shadow: 0 0 2px #fff, 0 0 10px #ffa060, 0 0 22px var(--neon), 0 0 46px #ff3d00, 0 0 80px rgba(255, 61, 0, .6);
}
.flicker { animation: flicker 7s steps(1, end) infinite; }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  41% { opacity: 1; } 42% { opacity: .35; text-shadow: none; } 43% { opacity: 1; } 44% { opacity: .5; text-shadow: none; } 45% { opacity: 1; }
  78% { opacity: 1; } 79% { opacity: .3; text-shadow: none; } 80% { opacity: 1; }
}
.sign-box {
  margin-top: 8px; padding: 4px 20px 2px; transform: rotate(-2deg);
  background: linear-gradient(180deg, #ffe07a 0%, #ffc12e 55%, #f5a600 100%);
  border: 4px solid var(--ink); border-radius: 8px;
  box-shadow: 0 6px 0 var(--ink), 0 0 36px rgba(255, 190, 50, .55), inset 0 2px 0 rgba(255, 255, 255, .6);
  animation: lightbox 5s ease-in-out infinite;
}
.sign-box span { font-family: var(--sign-font); font-size: clamp(20px, 3.6vw, 40px); letter-spacing: .2em; color: #c42a10; text-shadow: 0 2px 0 rgba(255, 255, 255, .45); padding-left: .2em; }
@keyframes lightbox { 0%, 100% { box-shadow: 0 6px 0 var(--ink), 0 0 36px rgba(255, 190, 50, .55), inset 0 2px 0 rgba(255, 255, 255, .6); } 50% { box-shadow: 0 6px 0 var(--ink), 0 0 52px rgba(255, 190, 50, .75), inset 0 2px 0 rgba(255, 255, 255, .6); } }
.sign-tag { margin-top: 14px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #ffd9b0; opacity: .85; }

/* ---------------------------------------------------------------- card */
.start-card {
  position: relative; width: min(540px, 100%); color: var(--ink); text-shadow: none;
  background: var(--cream); border: 4px solid var(--ink); border-radius: 18px; padding: 18px 20px 14px;
  box-shadow: 0 10px 0 var(--ink), 0 28px 60px rgba(0, 0, 0, .5);
}
.start-card label, .field label { display: block; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.start-card input:not([type=checkbox]):not([type=range]) {
  width: 100%; min-width: 0; padding: 11px 12px; font: 600 17px "Trebuchet MS", "Segoe UI", sans-serif; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; outline: none;
}
.start-card input:focus { box-shadow: 0 0 0 3px rgba(232, 84, 30, .35); }
.name-row { display: flex; gap: 8px; }
.start-name { margin-bottom: 14px; }
.field { margin: 12px 0; }
.code-input { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace !important; letter-spacing: .25em; text-transform: uppercase; }

.btn, .btn-big, .icon-btn {
  font: bold 16px "Trebuchet MS", "Segoe UI", sans-serif; color: #fff; cursor: pointer; text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
  background: linear-gradient(180deg, var(--orange-2), var(--orange)); border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 0 4px 0 var(--ink); transition: transform .06s, box-shadow .06s, filter .15s; -webkit-tap-highlight-color: transparent;
}
.btn { width: 100%; padding: 11px 14px; margin-top: 10px; }
.btn:hover, .btn-big:hover, .icon-btn:hover { filter: brightness(1.08); }
.btn:active, .btn-big:active, .icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled, .btn-big:disabled { filter: grayscale(.8) brightness(.95); cursor: default; transform: none; box-shadow: 0 4px 0 var(--ink); opacity: .7; }
.btn.small { width: auto; margin: 0; padding: 7px 12px; font-size: 14px; }
.btn.ghost { background: var(--cream-2); color: var(--ink); text-shadow: none; }
.btn.danger { background: linear-gradient(180deg, #e0563f, var(--red)); }
.btn-big {
  display: block; width: 100%; padding: 14px 16px; font-size: 21px; letter-spacing: .02em; border-radius: 12px; box-shadow: 0 6px 0 var(--ink);
  background: linear-gradient(180deg, #ff8a3d 0%, var(--orange) 60%, #c9410f 100%);
}
.btn-big small { display: block; font-size: 12px; font-weight: normal; opacity: .9; margin-top: 2px; }
.btn-big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.icon-btn { flex: none; width: 48px; padding: 0; font-size: 22px; background: var(--cream-2); color: var(--ink); text-shadow: none; }
.icon-btn.small { width: 34px; height: 34px; font-size: 15px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); border-radius: 8px; }
.link-btn { display: block; margin: 12px auto 0; background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: 14px "Trebuchet MS", sans-serif; }

.start-card.joining button { pointer-events: none; }
.start-card.joining #join { filter: grayscale(.3); }
.start-card.joining #join::after { content: ' …'; }

/* tabs */
.tabs { display: grid; grid-template-columns: 1.25fr 1fr .8fr .9fr; gap: 6px; margin: 16px 0 10px; }
.tabs button {
  padding: 8px 4px; font: bold 14px "Trebuchet MS", sans-serif; color: var(--ink); cursor: pointer; white-space: nowrap;
  background: var(--cream-2); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink);
}
.tabs button.active { background: var(--ink); color: var(--yellow); box-shadow: 0 3px 0 #000; }
.tab-panel { min-height: 120px; }

/* lobby lists */
.lobby-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; max-height: min(320px, 42vh); overflow-y: auto; padding-right: 2px; }
.lobby-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; cursor: pointer;
  background: #fff; border: 2px solid var(--ink); border-radius: 10px; transition: transform .08s;
}
.lobby-row:hover { transform: translateX(2px); }
.lobby-row.live { }
.lobby-row.expired { opacity: .55; cursor: default; }
.lobby-row.mine { grid-template-columns: auto 1fr auto auto; padding-left: 6px; cursor: default; }
.lr-main { min-width: 0; display: flex; flex-direction: column; }
.lr-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lr-actions { display: flex; gap: 6px; align-items: center; }
.status { font-size: 12px; font-weight: bold; white-space: nowrap; }
.status.on { color: var(--green); }
.status.zz { color: #6b5f8a; font-weight: normal; }
.status.zz::before { content: 'z'; font-style: italic; font-weight: bold; margin-right: 3px; }
.status.dead { color: var(--red); }
.pill { display: inline-block; font-size: 11px; font-weight: bold; padding: 1px 7px; border-radius: 99px; background: var(--cream-2); border: 1.5px solid var(--ink); color: var(--ink); }
.pill.pub { background: #d3f9d8; }
.pill.priv { background: #ffe3e3; }
.star { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #b8a990; padding: 2px; }
.star.on { color: #f59f00; text-shadow: 0 1px 0 var(--ink); }
.empty { list-style: none; text-align: center; color: var(--muted); padding: 14px 6px; font-size: 14px; }
.empty.big { padding: 22px 8px; border: 2px dashed #cdbd9f; border-radius: 12px; line-height: 1.6; }
.empty .btn { margin-top: 10px; }
.list-head { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.list-head small { text-transform: none; letter-spacing: 0; font-weight: normal; }
.policy, .muted { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }

/* new lobby */
.vis-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vis-toggle button {
  text-align: left; padding: 9px 12px; cursor: pointer; color: var(--ink); background: #fff; border: 3px solid #cdbd9f; border-radius: 12px;
  font: 15px "Trebuchet MS", sans-serif;
}
.vis-toggle button small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.vis-toggle button.active { border-color: var(--ink); background: #fff3bf; box-shadow: 0 3px 0 var(--ink); }
.vis-toggle button[data-vis=private] b::before { content: '🔒 '; }
.vis-toggle button[data-vis=public] b::before { content: '🌍 '; }
.share-box { margin-top: 12px; padding: 12px; background: #fff3bf; border: 3px dashed var(--ink); border-radius: 12px; text-align: center; }
.share-box h3 { margin: 2px 0 6px; font-size: 20px; }
.share-box .muted { margin: 8px 0; }
.kicker { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .18em; color: var(--orange); }
.big-code { font-size: 14px; color: var(--muted); margin: 4px 0 8px; }
.big-code b { display: block; font-family: var(--sign-font); font-size: 34px; letter-spacing: .18em; color: var(--ink); font-weight: normal; }
.link-row { display: flex; gap: 6px; }
.link-row input { font-size: 13px !important; padding: 8px 10px !important; font-family: ui-monospace, Menlo, monospace !important; }

/* invite */
#invite { text-align: center; padding: 4px 0 2px; }
#invite h2 { margin: 6px 0 10px; font-size: 24px; line-height: 1.2; }
.invite-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-bottom: 14px; min-height: 22px; }
#invite .field { text-align: left; }

.start-error { color: var(--red); font-weight: bold; font-size: 14px; text-align: center; min-height: 1.2em; margin: 10px 0 0; }
.start-error:empty { margin: 0; min-height: 0; }

.start-foot { max-width: 760px; text-align: center; font-size: 12px; line-height: 1.5; color: rgba(255, 236, 214, .72); }
.keys-touch { display: none; }
body.touch .keys-touch { display: inline; }
body.touch .keys-desktop { display: none; }

/* touch.css disables panning/selection on the body – the menus need both */
body.touch #menu, body.touch #game-menu .gm-card { touch-action: pan-y; }
body.touch #menu input, body.touch #game-menu input { -webkit-user-select: text; user-select: text; }

/* wide screens: sign left, card right */
/* (user request) logo and card always stacked; everything scales with the screen HEIGHT too,
   so sign + card + list fit on one screen without scrolling on laptops */
/* phones (portrait) */
@media (max-width: 520px) {
  .start-wrap { justify-content: flex-start; gap: 16px; padding-top: max(18px, env(safe-area-inset-top)); }
  .start-logo { gap: 8px; }
  .spit { height: 78px; }
  .sign-neon { font-size: clamp(42px, 14vw, 64px); }
  .sign-tag { font-size: 10px; letter-spacing: .06em; margin-top: 10px; }
  .start-card { padding: 14px 12px 12px; border-radius: 16px; }
  .tabs { grid-template-columns: repeat(4, auto); }
  .tabs button { font-size: 12.5px; padding: 8px 2px; }
  .btn-big { font-size: 19px; }
  .lobby-row { grid-template-columns: 1fr auto; gap: 6px; }
  .lobby-row > .status { grid-column: 1; grid-row: 2; }
  .lobby-row > .lr-join { grid-column: 2; grid-row: 1 / span 2; }
  .lobby-row.mine { grid-template-columns: auto 1fr; }
  .lobby-row.mine > .status { grid-column: 2; grid-row: 2; }
  .lobby-row.mine .lr-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .lobby-list { max-height: none; }
  .vis-toggle button small { font-size: 11px; }
  .start-foot { font-size: 11px; }
}
/* phones (landscape) / short screens: sign left, card right, both compact */
@media (max-height: 520px) and (orientation: landscape) {
  .start-wrap { flex-direction: row; align-items: flex-start; justify-content: center; gap: 18px; padding-top: max(12px, env(safe-area-inset-top)); }
  .start-logo { flex-direction: column; gap: 6px; position: sticky; top: 12px; width: 38%; }
  .spit { height: 64px; }
  .sign-neon { font-size: clamp(34px, 7vw, 60px); }
  .sign-box span { font-size: 18px; }
  .sign-tag { display: none; }
  .start-card { width: min(520px, 60%); padding: 12px 14px; }
  .tabs { margin: 10px 0 8px; }
  .start-foot { display: none; }
  .lobby-list { max-height: none; }
}

/* ---------------------------------------------------------------- in-game menu */
#menu-btn {
  position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 1001;
  width: 40px; height: 40px; padding: 0; font-size: 20px; line-height: 1; color: #fff; cursor: pointer;
  background: rgba(0, 0, 0, .45); border: 3px solid var(--ink); border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
#menu-btn:hover { background: rgba(232, 84, 30, .85); }
#hud.hidden ~ #menu-btn { display: none; }
#hud #players { right: 62px; } /* room for the menu button */
body.touch #hud #players { right: calc(max(10px, env(safe-area-inset-right)) + 48px); }
body.touch #menu-btn { width: 36px; height: 36px; font-size: 18px; border-width: 2px; top: max(6px, env(safe-area-inset-top)); }
@media (orientation: portrait) {
  /* portrait phones: the money pill owns the top-right corner, the button sits under it */
  body.touch.portrait #menu-btn { top: calc(max(8px, env(safe-area-inset-top)) + 32px); right: max(8px, env(safe-area-inset-right)); width: 32px; height: 28px; font-size: 15px; border-radius: 14px; }
}
/* FPS/ping line only when switched on in the settings */
#hud #stats { display: none; }
body.show-fps #hud #stats { display: block; }

.gm {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(12, 7, 5, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: var(--ink); text-shadow: none; overflow-y: auto;
}
.gm-card {
  width: min(430px, 100%); max-height: calc(100% - 8px); overflow-y: auto; background: var(--cream); border: 4px solid var(--ink);
  border-radius: 18px; padding: 18px 20px; box-shadow: 0 10px 0 var(--ink), 0 26px 60px rgba(0, 0, 0, .5);
}
.gm-head { text-align: center; margin-bottom: 12px; }
.gm-head h2 { margin: 0; font-family: var(--sign-font); font-weight: normal; font-size: 30px; color: var(--orange); letter-spacing: .04em; }
.gm-head h2 small { display: block; font: 12px "Trebuchet MS", sans-serif; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.gm-lobby { margin-top: 8px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 16px; }
#gm-main .btn-big { margin-bottom: 4px; }
#gm-main .share-box { text-align: center; }
#gm-settings fieldset { border: 2px solid #d8c9ac; border-radius: 12px; margin: 0 0 10px; padding: 6px 12px 10px; }
#gm-settings legend { font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 6px; }
#gm-settings .row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; font-size: 15px; margin: 8px 0; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: normal; }
#gm-settings .row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--orange); height: 22px; }
#gm-settings .row output { font-weight: bold; font-variant-numeric: tabular-nums; }
#gm-settings .row.check { grid-template-columns: auto 1fr; cursor: pointer; }
#gm-settings .row.check input { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; }
.seg { grid-column: 1 / -1; display: flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 7px 2px; font: bold 13px "Trebuchet MS", sans-serif; background: #fff; color: var(--ink); border: none; border-left: 2px solid var(--ink); cursor: pointer; }
.seg button:first-child { border-left: none; }
.seg button.active { background: var(--ink); color: var(--yellow); }
.gm-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.gm-row .btn { flex: 1; }
@media (max-height: 520px) {
  .gm-card { padding: 12px 14px; }
  .gm-head h2 { font-size: 22px; }
  .gm { align-items: flex-start; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .btn-big { padding: 9px 12px; font-size: 18px; }
  .btn-big small { display: none; }
  .start-name { margin-bottom: 10px; }
  .start-card input:not([type=checkbox]):not([type=range]) { padding: 8px 10px; }
}
@media (max-width: 520px) { .sign-tag { max-width: 92vw; } }
.link-row input { flex: 1; min-width: 0; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 10px; }

/* ---- always fit stacked: sizes follow min(width, height) */
.sign-neon { font-size: clamp(36px, min(9.5vw, 10.5vh), 116px); }
.sign-box span { font-size: clamp(15px, min(3.6vw, 3.8vh), 40px); }

.sign-tag { margin-top: clamp(6px, 1.4vh, 14px); }
.start-wrap { justify-content: safe center; gap: clamp(8px, 2vh, 22px); padding-top: clamp(8px, 2.5vh, 32px); }
.lobby-list { max-height: min(320px, 30vh); }

/* ---- in-game menu / settings on phones: one clean column */
@media (max-width: 560px) {
  .gm { padding: 8px; align-items: flex-start; }
  .gm-card { padding: 12px; border-width: 3px; border-radius: 14px; max-height: calc(100dvh - 16px); }
  .gm-head h2 { font-size: 24px; }
  #gm-settings fieldset { padding: 4px 10px 8px; }
  #gm-settings .row { font-size: 14px; margin: 7px 0; }
  .seg { flex-wrap: wrap; }
  .seg button { flex: 1 1 30%; font-size: 12px; padding: 9px 2px; border-left: none; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: -2px; }
  .gm-row { flex-direction: column; gap: 8px; }
}

/* controls explanation is not shown on the lobby page (user request) */
.start-foot { display: none !important; }

/* ---- owner edit form (lobbyEditor in settings.js): "Meine" rows + in-game menu */
.lobby-edit { grid-column: 1 / -1; margin-top: 4px; padding: 10px; text-align: left; background: var(--cream); border: 2px dashed #cdbd9f; border-radius: 10px; cursor: default; }
.lobby-edit label { display: block; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.lobby-edit .le-name {
  width: 100%; min-width: 0; padding: 9px 11px; font: 600 16px "Trebuchet MS", "Segoe UI", sans-serif; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 10px; outline: none;
}
.lobby-edit .le-name:focus { box-shadow: 0 0 0 3px rgba(232, 84, 30, .35); }
.lobby-edit .vis-toggle { margin-top: 10px; }
.lobby-edit .le-newcode { margin-top: 10px; }
.lobby-edit .le-newcode.active { background: #fff3bf; }
.lobby-edit .le-hint:empty { display: none; }
.lobby-edit .le-err { text-align: left; }
.le-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.lobby-row.editing, .lobby-row.editing:hover { transform: none; }
.lobby-row.mine .lr-actions { flex-wrap: wrap; justify-content: flex-end; }
.gm-edit-btn { margin-top: 8px; }
.gm-edit .lobby-edit { margin-top: 8px; }
@media (max-width: 520px) {
  .lobby-edit { padding: 8px; }
  .lobby-edit .vis-toggle button { padding: 8px 9px; }
  .le-actions .btn { flex: 1; }
}

/* legal links under the card (required in DE) */
.legal-links { text-align: center; font-size: 12px; margin-top: 4px; }
.legal-links a { color: rgba(255, 236, 214, .75); text-decoration: none; }
.legal-links a:hover { color: #fff; text-decoration: underline; }
.lobby-list:has(.lobby-row.editing) { max-height: none; } /* the open edit form must not scroll inside the list */

/* logo proportions like the social preview image: spit ≈ 2.2 × letter height, box text ≈ 0.35 ×,
   spit and lettering close together (all derived from the same size so they scale together) */
.start-logo { --logo: clamp(36px, min(9.5vw, 10.5vh), 116px); gap: calc(var(--logo) * .12); }
.sign-neon { font-size: var(--logo); }
.sign-box span { font-size: calc(var(--logo) * .35); }
.spit { height: calc(var(--logo) * 2.2); }
/* tagline under the whole logo, so it doesn't widen the lettering column (spit stays close) */
.start-logo { position: relative; padding-bottom: calc(var(--logo) * .3); }
.sign-tag { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); white-space: nowrap; margin: 0; }
@media (max-width: 520px) { .sign-tag { white-space: normal; width: 92vw; } }
/* SEO: real h1 for crawlers/screen readers, the neon sign is the visual title */
.seo-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.about-game { max-width: 520px; margin: 6px auto 0; font-size: 12px; color: rgba(255, 236, 214, .75); text-align: center; }
.about-game summary { cursor: pointer; list-style: none; }
.about-game summary::-webkit-details-marker { display: none; }
.about-game summary:hover { color: #fff; text-decoration: underline; }
.about-game[open] { background: rgba(20, 12, 8, .82); border-radius: 10px; padding: 8px 14px; text-align: left; line-height: 1.5; }
.about-game[open] summary { text-align: center; margin-bottom: 4px; }
.about-game p { margin: 6px 0; }
