/* The main menu (renderMainMenu, js/src/36-saving.js), the owner's layout: New game (warm) and Saved games (green) side by side, Multiplayer
   (blue) across the whole width under them, and one Start button for whatever is picked (outlined). They stack on a narrow window. Then the
   loading screen, and the Drop chip. */
.mm { width: min(980px, 100%); padding: 18px 22px 14px; }
.mmhead { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mmhead .logo { margin: 0; }
.mmhead .resume { font-size: 14px; padding: 9px 16px; }
.mmcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 760px) { .mmcols { grid-template-columns: 1fr; } }
.mmcol { border: 1px solid #dcd2b0; border-radius: 12px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mm-new { background: #fff6dc; } .mm-saves { background: #eef6e2; } .mm-multi { background: #e6f0f8; }
.mmcol h2 { margin: 0 0 4px; font: 700 18px var(--font-display); color: #4a3412; text-align: center; }
/* what Start will start */
.mmcol.picked { box-shadow: 0 0 0 3px #f0b73a; }
.mmcol .save.picked .card { border-color: #8a7550; }      /* the saved farm picked: just a darker thin outline (the owner) */
.mmcol .mpcheck { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin-top: 10px; font-weight: 700; font-size: 14px;
  cursor: pointer; }
.mmcol .mpcheck input { flex: none; width: 18px; height: 18px; margin: 0; }
.mm .mmcol h3 { margin: 8px 0 0; font-size: 10px; }
.mmcol .hint { margin: 0; font-size: 12px; color: #6a5a30; }
.mmcol .line, .mmcol .who { display: flex; gap: 6px; align-items: center; }
.mmcol .who button { flex: 1; font-size: 14px; padding: 10px 6px; }
.mmcol input { width: 100%; }
.mmcol .farmname { display: flex; align-items: center; gap: 6px; } .mmcol .farmname span { font-weight: 700; font-size: 14px; white-space: nowrap; }
.mm button:disabled { opacity: .45; cursor: default; }

/* the saved farms: the whole name is the button that plays it */
.mmcol .saves { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow-y: auto; }
.mmcol .save { display: flex; gap: 6px; align-items: stretch; }
.mmcol .save .card { flex: 1; min-width: 0; display: flex; flex-direction: column; border: 1px solid #dcd2b0; border-radius: 10px; background: #fffdf6;
  overflow: hidden; }
.mmcol .save .play { text-align: left; padding: 8px 10px; background: none; border: 0; border-radius: 0; }
.mmcol .save .play:hover { background: #fff1c8; }

.mmcol .save .addmp { align-self: flex-end; margin: 0 8px 8px; font-size: 12px; padding: 4px 10px; white-space: nowrap; }
.mmcol .save .addmp b { display: inline; font-size: 14px; margin-left: 4px; } .mmcol .save .addmp.on { background: #f0b73a; border-color: #b9851a; }
.mmcol .save b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmcol .save small { display: block; font-weight: 500; font-size: 12px; color: #7a6a3a; }
.mmcol .save .del { color: #9a2a1a; padding: 0 10px; }
.mmcol .delall { display: flex; justify-content: flex-end; margin-top: 8px; }
.mm button.danger { background: #c8382a; border-color: #8e2117; color: #fff; }
.mmcol .empty { margin: 4px 0; font-size: 14px; color: #6a5a30; }

/* playing with a friend: sharing your own farm on the left, joining a friend's on the right */
.mm-multi { margin-top: 14px; }
.mm-multi .mm-mp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .mm-multi .mm-mp { grid-template-columns: 1fr; } }
.mm-multi .mm-mp h3 { margin: 4px 0 6px; }
.mm-multi .line input { flex: 1; min-width: 0; }
.mm-multi #netList { display: flex; flex-direction: column; gap: 4px; }
.mm-multi #netCode { width: 100%; font: 10px 'JetBrains Mono', monospace; }
.mm-multi .status { margin: 4px 0 0; font-size: 12px; color: #2e4a62; }
.mm-multi .leave { align-self: flex-start; }
.mm-multi [hidden] { display: none !important; }
.mmgo { display: flex; justify-content: center; margin-top: 16px; }
.mmgo #mmStart { min-width: min(420px, 100%); font-size: 18px; padding: 12px 24px; }

/* ---------- the loading screen: up before anything else, then fades away to show the game ---------- */
#loading { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #24331f; color: #fff6dc;
  transition: opacity .8s ease; }
#loading.gone { opacity: 0; pointer-events: none; }
#loading .ld { width: min(320px, 80vw); text-align: center; }
#loading h1 { font: 700 30px var(--font-display, 'Bricolage Grotesque', sans-serif); margin: 0 0 14px; color: #f1d48a; }
#loading .ldbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.15); overflow: hidden; }
#loading .ldbar i { display: block; height: 100%; width: 12%; background: #f0b73a; border-radius: 5px; transition: width .3s ease; }
#loading p { margin: 10px 0 0; font-size: 12px; opacity: .8; }
#loading .ldver { margin-top: 18px; opacity: .55; }      /* which version is loading */

/* ---------- the Drop chip (the owner: white, a little smaller, easy to find by its slow glow) ---------- */
.dropbar .btn.dropchip, .dropchip { background: #fff; border: 1px solid #c9b98a; color: #2a2208; font-size: 12px; padding: 4px 10px 4px 8px;
  border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.dropbar .btn.dropchip:hover, .dropchip:hover { background: #fff8e6; }
.dropchip .dico, .dropchip .dico img.tool-ico, .dropchip .dico img.itm { width: 22px; height: 22px; }
/* while something is being dragged, the hand everywhere (updateCursor, 33) */
body.dragging * { cursor: inherit !important; }
/* the picture on the label that follows the pointer while you drag something out of the Inventory (33) */
.ip-ghost .gi { display: inline-flex; width: 30px; height: 26px; vertical-align: middle; align-items: center; justify-content: center; }
.ip-ghost .gi img, .ip-ghost .gi svg { width: 100%; height: 100%; object-fit: contain; }

/* ---------- phones: only a note (index.html) ---------- */
body.desk-only { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #24331f; }
.desk-only-msg { font: 700 30px var(--font-display, 'Bricolage Grotesque', sans-serif); color: #f1d48a; text-align: center; }
/* the owner's mock-up (November 2026): Create Game and Load Game in green on their cards, the Multiplayer tick and its code beside, joining
   on its own panel with Connected in green or Not connected in red, Go to Game at the foot, an X in the corner */
.mm { position: relative; }
.mm .mmx { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; padding: 0; background: #fff; }
.mm button.green { background: #22c84a; border-color: #179a36; color: #10301a; font-size: 14px; padding: 9px 22px; }
.mmcol .mmrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.mmcol .mpcheck { margin-top: 0; }
.mmcol .mpcode { font-size: 14px; color: #2b2418; }
.mmcol .save .card { padding: 8px 10px; }
.mmcol .save .card .mmrow { margin-top: 6px; }
.mmcol .save .card .green { font-size: 12px; padding: 6px 16px; }
.mm-multi .line .hint { margin-left: 8px; white-space: nowrap; }
.mm-multi .conn { margin: 6px 0 0; font-size: 14px; font-weight: 700; } .mm-multi .conn.on { color: #1f9a3a; } .mm-multi .conn.off { color: #c8382a; }
.mmgo #mmStart[hidden] { display: none; }
.mmcol .save .del { align-self: flex-start; padding: 8px 14px; }      /* a small button beside the farm, not the farm's height */

/* What's new (36b): a log in the menu's bottom-right corner, and the last few versions' changes in a panel over the menu */
.mm .mmlog { position: absolute; right: 12px; bottom: 10px; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; background: #fff; }
.mm .mmlogpanel { position: absolute; inset: 10px; z-index: 5; overflow-y: auto; padding: 16px 22px; border-radius: 14px; background: #fffaf0;
  box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.mm .mmlogpanel[hidden] { display: none; }
.mm .mmloghead { display: flex; align-items: center; justify-content: space-between; } .mm .mmloghead .mmx { position: static; }
.mm .mmlogpanel h3 { margin: 14px 0 4px; font-size: 14px; } .mm .mmlogpanel h3 small { font-size: 12px; font-weight: 500; opacity: .7; margin-left: 6px; }
.mm .mmlogpanel ul { margin: 0; padding-left: 20px; font-size: 12px; line-height: 1.5; }

/* The menu, colour coded (the owner, November 2026): Playing now green across the top, then New game orange, Saved games blue and Join a
   friend purple; purple wherever multiplayer is (Invite a friend, the farm's word, Go). Each card a pale tint, a strong top edge and its
   heading in its own colour. */
.mm { --cur: #2f9a4a; --new: #e08a1e; --saved: #3a78c0; --join: #8a52c8; }
.mm .mmcols { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
@media (max-width: 900px) { .mm .mmcols { grid-template-columns: 1fr; } }
.mm .mmcol { border-top: 5px solid var(--c); } .mm .mmcol h2 { color: var(--c); }
.mm .mm-cur { --c: var(--cur); background: #e6f6e6; } .mm .mm-new { --c: var(--new); background: #fff3de; }
.mm .mm-saves { --c: var(--saved); background: #e8f0fb; } .mm .mm-multi { --c: var(--join); background: #f2eafb; margin-top: 0; }
.mm-cur .curline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mm-cur .curinfo { flex: 1; min-width: 200px; } .mm-cur .curinfo b { display: block; font-size: 18px; } .mm-cur .curinfo small { font-size: 12px; color: #4a5a40; }
.mm button.big { font-size: 18px; padding: 12px 26px; }
.mm button.purple { background: var(--join); border-color: #6a3aa8; color: #fff; font-size: 14px; padding: 9px 18px; }
.mm button.blue { background: var(--saved); border-color: #2a5a98; color: #fff; font-size: 12px; padding: 6px 16px; }
.mm-cur .share { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f2eafb;
  border: 2px solid var(--join); font-size: 14px; }
.mm-cur .share .word { font: 700 30px var(--font-display); letter-spacing: .12em; color: var(--join); background: #fff; border-radius: 8px;
  padding: 4px 14px; } .mm-cur .share .word.on { color: var(--cur); } .mm-cur .share .word.wait { letter-spacing: 0; }
.mm-cur .empty { margin: 2px 0; font-size: 14px; color: #4a5a40; text-align: center; }
.mm-multi #netIn { text-transform: uppercase; font-size: 18px; letter-spacing: .1em; }
.mm-multi #netIn::placeholder { text-transform: none; letter-spacing: 0; font-size: 14px; }
.mm { padding-bottom: 62px; } .mm .note { position: absolute; left: 22px; bottom: 18px; margin: 0; }      /* room for the log button below the cards */
.mm-multi .conn[hidden] { display: none; }

/* (the owner: more room for saved games) Playing now on one line, its heading beside the farm; each saved farm one short line, Load and Delete
   on the right; the list as tall as the column allows. Sizes from the usual set (12, 14, 18). */
.mm .mm-cur { padding: 8px 14px; } .mm .mm-cur h2 { margin: 0; white-space: nowrap; }
.mm-cur .curline { gap: 14px; } .mm-cur .curinfo { min-width: 160px; } .mm-cur .curinfo b { display: inline; font-size: 14px; }
.mm-cur .curinfo small { margin-left: 8px; } .mm-cur .empty { flex: 1; text-align: left; margin: 0; }
.mm-cur .share { margin-top: 8px; padding: 6px 12px; }
.mmcol .save .card { flex-direction: row; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; }
.mmcol .save .card .txt { flex: 1; min-width: 0; } .mmcol .save .card .txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mmcol .save .card .blue { padding: 6px 12px; } .mmcol .save .card .del { align-self: center; padding: 6px 10px; font-size: 12px; }
.mmcol .saves { max-height: 360px; gap: 4px; }

/* Playing now with nothing playing: greyed; and its pop when a farm arrives in it (mmFlyIn, 36), with the card that flies there */
.mm .mm-cur.none { --c: #9a9a96; background: #ecebe6; } .mm .mm-cur.none h2 { color: #8a8a86; }
.mm .mm-cur.pop { animation: mmPop .6s ease-out; }
@keyframes mmPop { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(47,154,74,.0); } 35% { transform: scale(1.025); box-shadow: 0 0 0 6px rgba(47,154,74,.45); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(47,154,74,0); } }
.mmfly { position: fixed; z-index: 300; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #e6f6e6;
  border: 2px solid #2f9a4a; box-shadow: 0 8px 22px rgba(0,0,0,.3); font: 700 14px 'DM Sans', sans-serif; color: #1f4a28; pointer-events: none; }
