/* Extras on top of the local tool's XP stylesheet (/xp/app.css), for what
   only the public site has: the log-in screen, the account menu, the
   Library and Presets tabs, latitude bands, the admin tab, phones.
   The loading and welcome screens are ordinary full-height boxes, not fixed
   overlays: popup and overlay blockers (e.g. PopOff) remove full-window
   fixed elements. */

#boot { height: 100%; display: grid; place-items: center; background: #5A7EDC; color: #fff; font: 14px Tahoma, sans-serif; }
#app[hidden], #welcome[hidden], #boot[hidden] { display: none !important; }

.menu .mi .key { color: inherit; opacity: .7; }

/* -- the log-in screen (XP "Welcome" style) ------------------------------------- */
#welcome { height: 100%; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; background: #5A7EDC; color: #fff; font-family: Tahoma, "Segoe UI", sans-serif; overflow: auto; }
.ls-top { flex: none; height: 78px; background: #00309C; border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, #00309C, #9BB5F4 45%, #9BB5F4 55%, #00309C) 1; }
.ls-mid { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 0; padding: 30px 20px;
  background: radial-gradient(ellipse at 18% 30%, #95B1EC 0%, #7393E2 22%, #5A7EDC 55%); min-height: 380px; }
.ls-left { width: 380px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 10px; padding-right: 34px; }
.ls-left h1 { font: bold 34px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -.5px; color: #fff; text-shadow: 1px 2px 3px rgba(0, 0, 60, .35); margin: 4px 0 0; }
.ls-left p { color: #fff; font-size: 13px; line-height: 1.5; max-width: 330px; margin: 0; }
.ls-left .hero-map { border: 2px solid #fff; border-radius: 4px; box-shadow: 2px 3px 8px rgba(0, 0, 50, .35); }
.ls-divider { width: 1px; align-self: stretch; margin: 10px 0; background: linear-gradient(transparent, rgba(255, 255, 255, .85) 20%, rgba(255, 255, 255, .85) 80%, transparent); }
.ls-users { width: 400px; display: flex; flex-direction: column; gap: 8px; padding-left: 34px; }
.ls-hint { font-size: 14px; margin-bottom: 6px; }
.ls-user { display: flex; align-items: center; gap: 14px; padding: 8px 10px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.ls-user:hover, .ls-user:focus-visible { background: linear-gradient(90deg, #3C62C8, rgba(60, 98, 200, 0)); border-color: rgba(255, 255, 255, .25); outline: none; }
.ls-pic { width: 52px; height: 52px; flex: none; border: 2px solid #fff; border-radius: 5px; background: linear-gradient(135deg, #F7C25B, #E58B1F); display: grid; place-items: center; box-shadow: 1px 2px 4px rgba(0, 0, 50, .3); }
.ls-pic .ico { width: 30px; height: 30px; }
.ls-who { display: flex; flex-direction: column; gap: 2px; }
.ls-who b { font-size: 17px; font-weight: normal; }
.ls-who span { font-size: 11px; color: #DCE6FB; }
.ls-note { font-size: 12px; background: rgba(0, 0, 60, .25); padding: 6px 10px; border-radius: 4px; }
.ls-wait { display: flex; gap: 12px; align-items: flex-start; background: rgba(0, 30, 120, .25); padding: 12px; border-radius: 6px; line-height: 1.5; }
.ls-wait .big { width: 40px; height: 40px; flex: none; }
.ls-wait b { font-size: 15px; }
.ls-small { color: #DCE6FB !important; align-self: flex-start; margin-left: 10px; }
.ls-dev { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; background: rgba(0, 0, 60, .2); padding: 8px 10px; border-radius: 6px; font-size: 11px; }
.ls-dev span { color: #DCE6FB; }
.ls-dev input[type=text] { grid-column: 1 / -1; }
.ls-dev .btn { justify-self: end; }
.ls-bottom { flex: none; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; background: #00309C;
  border-top: 2px solid transparent; border-image: linear-gradient(90deg, #00309C, #F79F42 45%, #F79F42 55%, #00309C) 1; }
.ls-help { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; color: #fff; font: 13px Tahoma, sans-serif; cursor: pointer; padding: 6px 8px; border-radius: 4px; }
.ls-help:hover { background: rgba(255, 255, 255, .12); }
.ls-help .ico { width: 22px; height: 22px; }
.ls-fine { font-size: 11px; color: #C4D3F6; text-align: right; }
.ls-fine a { color: #fff; }
.ls-or { margin: 10px 0 0; font-size: 12px; color: #DCE6FB; border-top: 1px solid rgba(255, 255, 255, .3); padding-top: 10px; }
.help-body { max-width: 640px; line-height: 1.5; }
.help-body ol { padding-left: 20px; margin: 4px 0 8px; }
.help-body li { margin: 3px 0; }

/* -- the account button and menu ------------------------------------------------- */
/* Ko-fi link in the toolbar, styled like Ko-fi's own button */
.kofi-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; height: 26px; padding: 0 12px; border-radius: 13px;
  background: #72a4f2; color: #fff; font-weight: bold; font-size: 12px; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.kofi-btn:hover { background: #5f93e6; color: #fff; }
.kofi-cup { display: inline-flex; }
@media (max-width: 860px) { .kofi-txt { display: none; } .kofi-btn { padding: 0 6px; margin-left: 4px; } }
.acct-btn { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 2px 8px; height: 30px; border: 1px solid transparent; border-radius: 3px; background: transparent; font: inherit; cursor: pointer; }
.acct-btn:hover, .acct-btn.open { border-color: #CECEC3; background: linear-gradient(#FEFEFE, #EBEAE5); }
.acct-btn.open { background: linear-gradient(#E3E3DB, #F3F3EE); }
.acct-btn .ico { width: 18px; height: 18px; }
.acct-name { font-weight: bold; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-caret { font-size: 9px; color: var(--muted); }
.acct-menu { width: 290px; padding-bottom: 3px; }
.acct-menu .am-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px; margin: -2px -2px 2px; background: linear-gradient(90deg, #2160D8, #6E9CEC); color: #fff; }
.acct-menu .am-head .dim { color: #DCE6FB; }
.acct-menu .am-head b { font-size: 13px; }
.acct-menu .am-ico { width: 32px; height: 32px; background: #fff; border-radius: 4px; padding: 2px; flex: none; }
.acct-menu .am-sec { padding: 6px 10px 2px; color: #0046D5; font-weight: bold; border-top: 1px solid #EBEADB; margin-top: 3px; }
.acct-menu .am-head + .am-sec { border-top: 0; margin-top: 0; }
.acct-menu .mi .lbl { display: flex; gap: 6px; align-items: center; }
.am-meters { padding: 2px 10px 4px 30px; display: flex; flex-direction: column; gap: 4px; }
.am-meter .progress { height: 9px; width: 100%; }
.am-meter .progress > div { background: repeating-linear-gradient(90deg, #2FB52F 0 5px, #fff 5px 6px); }
.am-meter.full .progress > div { background: repeating-linear-gradient(90deg, #D9341E 0 5px, #fff 5px 6px); }
.am-mrow { display: flex; justify-content: space-between; gap: 6px; }
.am-login { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 10px; }
.am-login .grow { flex: 1; min-width: 0; }
.am-login .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- tabs ------------------------------------------------------------------------ */
.tab .tab-x { border: 0; background: transparent; padding: 0 0 0 6px; font-size: 13px; line-height: 1; color: var(--muted); cursor: pointer; }
.tab .tab-x:hover { color: #C8261B; }

/* -- the map ------------------------------------------------------------------------ */
.map-strip { flex-wrap: wrap; row-gap: 3px; }
.map-strip .seg button .ico { width: 14px; height: 14px; vertical-align: -3px; }
.map-source { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.map-source > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.src-world { background: #FFFFE1; border: 1px solid #C9B97E; padding: 1px 6px; border-radius: 3px; }
.src-world .ico { width: 14px; height: 14px; vertical-align: -3px; }
.map-wrap.tool-paint #map2d { cursor: none; }
.map-wrap.tool-paint.selecting #map2d { cursor: crosshair; }
.map-wrap.mode3d .map-legend { bottom: 40px; }
#map3d[hidden], #map2d[hidden] { display: none; }
.tool-seg { margin-left: 4px; }
/* draft: layers that come from the generated world */
.seg button.gen { font-style: italic; color: #1E4C9A; }
.seg button.gen.none { color: var(--muted); }
.checks-seg button.gen::before { content: '\2192'; border: 0; background: none; width: auto; }
.map-source .btn .ico { width: 14px; height: 14px; vertical-align: -3px; }
.tool-seg button { padding: 1px 5px; }
.tool-seg .ico { width: 15px; height: 15px; vertical-align: -3px; }
#map-settings { height: 24px; padding: 2px 4px; }
#map-settings .ico { width: 16px; height: 16px; }
#picture-select { max-width: 190px; }
.map-wrap.tool-inspect #map2d, .map-wrap.tool-profile #map2d, .map-wrap.tool-wind #map2d { cursor: crosshair; }
.map-wrap.has-profile .map-legend { bottom: 200px; }
.map-tip .tip-row { display: flex; align-items: center; gap: 5px; }
.map-tip .sub { color: var(--muted); }
.map-tip .sw { width: 10px; height: 10px; border: 1px solid #555; display: inline-block; }
.map-panel .inspect-kv { max-width: 330px; }
.climate-dlg { display: flex; flex-direction: column; gap: 6px; }
.climate-img { max-width: min(1100px, 86vw); max-height: 70vh; object-fit: contain; border: 1px solid #7F9DB9; background: #fff; }
.map-empty .empty-state { margin: 0 auto; }
.map-empty .btn { min-width: 190px; }
.map-note { position: absolute; top: 8px; left: 10px; right: 10px; margin: 0 auto; width: fit-content; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: #FFFFE1; border: 1px solid #000; padding: 4px 6px 4px 8px; box-shadow: 2px 2px 3px rgba(0, 0, 0, .2); }
.map-note > span { flex: 1 1 260px; }
.map-note .btn { flex: none; white-space: nowrap; }
.map-note .ico { width: 14px; height: 14px; vertical-align: -3px; }
.map-legend .dim { max-width: 200px; }
/* the key folds to its first title (editor.js renderLegend) */
.map-legend .lg-fold { cursor: pointer; user-select: none; }
.map-legend .lg-fold::before { content: "▾ "; color: var(--link); }
.map-legend.folded .lg-fold::before { content: "▸ "; }
.map-legend.folded > :not(.lg-fold) { display: none; }
@media (pointer: coarse) { .map-legend .lg-fold { padding: 4px 0; } }
.hero-map { width: 240px; height: 180px; border: 1px solid #7F9DB9; background: #20242C; image-rendering: auto; }

/* sea bar: the height graph is a drag control */
#hypso { width: 240px; height: 28px; touch-action: none; user-select: none; -webkit-user-drag: none; }
#hypso.dragging { outline: 1px dotted #C8261B; }
#hypso.off { cursor: default; opacity: .7; }

/* -- World Options extras: latitude bands, heights ---------------------------------- */
.info-block { margin: 2px 4px 8px; padding: 6px 8px; background: #F5F8FE; border: 1px solid #C7D5F1; border-radius: 3px; display: flex; flex-direction: column; gap: 4px; line-height: 1.4; }
.info-block .ib-title { font-weight: bold; color: #0046D5; }
.info-block .ib-title .ico { width: 14px; height: 14px; vertical-align: -3px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.quick-row .btn.small { padding: 1px 6px; min-width: 0; }
.bands { display: flex; flex-direction: column; border: 1px solid #D6D2C2; background: #fff; }
.band { display: grid; grid-template-columns: 20px minmax(0, 1.4fr) 74px minmax(0, 1.2fr); gap: 4px; align-items: center; padding: 1px 4px; }
.band + .band { border-top: 1px solid #F0EFE8; }
.band.bhead { background: linear-gradient(#fff, #EBEADB); color: var(--muted); }
.band .bnum { color: #fff; background: #3E6FC6; border-radius: 8px; text-align: center; font-size: 10px; line-height: 14px; }
.band .btemp { text-align: center; border-radius: 2px; padding: 0 2px; color: #000; }
.band > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lat-note { margin-top: 1px; }

/* -- Library ------------------------------------------------------------------------- */
.lib-head input[type=search] { width: 180px; }
.lib-count { margin-left: auto; }
#tab-library, #tab-presets { flex-direction: column; min-height: 0; }
#tab-library.active, #tab-presets.active { display: flex; }
.lib { flex: 1; display: flex; min-height: 0; gap: 0; }
.lib-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; background: #fff; }
.lib-card { border: 1px solid #D0D0BF; border-radius: 4px; background: #fff; display: flex; flex-direction: column; cursor: pointer; overflow: hidden; outline: none; }
.lib-card:hover { border-color: #7F9DB9; box-shadow: 0 1px 4px rgba(0, 40, 120, .18); }
.lib-card.sel { border-color: #316AC5; box-shadow: 0 0 0 2px #316AC5; }
.lib-card:focus-visible { box-shadow: 0 0 0 2px #F79F42; }
.lib-thumb { position: relative; flex: none; aspect-ratio: 16 / 10; background: #3A4448; display: grid; place-items: center; overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #C8D0D8; width: 70%; }
.lib-ph .big { width: 36px; height: 36px; }
.lib-ph-prog { width: 100%; height: 8px; background: #22282C; border: 1px solid #5A6670; }
.lib-ph-prog > div { height: 100%; background: repeating-linear-gradient(90deg, #2FB52F 0 5px, #22282C 5px 6px); }
.lib-st { position: absolute; top: 6px; right: 6px; }
.lib-body { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.lib-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.lib-stats { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1px 6px; font-size: 11px; }
.lib-stats .k { color: var(--muted); }
.lib-stats .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-detail { width: clamp(280px, 38%, 400px); flex: none; overflow: auto; border-left: 1px solid #D6D2C2; padding: 8px 10px 24px; background: #FCFCFE; display: flex; flex-direction: column; gap: 6px; }
.ld-head { display: flex; align-items: center; gap: 6px; }
.ld-head h3 { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: bold 13px "Trebuchet MS", Tahoma, sans-serif; color: #2E4E9E; }
.ld-thumb { width: 100%; border: 1px solid #7F9DB9; display: block; cursor: zoom-in; image-rendering: auto; }
.ld-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ld-live { display: flex; flex-direction: column; gap: 4px; }
.ld-bands { margin-top: 6px; }
.ld-files summary { cursor: pointer; }
.biome-bars { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.bb { display: grid; grid-template-columns: 12px 130px 1fr 34px; gap: 5px; align-items: center; font-size: 11px; }
.bb .sw { width: 10px; height: 10px; border: 1px solid #555; }
.bb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-bar { height: 8px; background: #F0EFE8; border: 1px solid #D6D2C2; }
.bb-bar > span { display: block; height: 100%; }
.lib-ups { flex: 1; overflow: auto; padding: 8px; background: #fff; }
.up-row { grid-template-columns: minmax(160px, 2fr) 110px 60px 80px 90px 90px 210px; }

/* -- Presets ------------------------------------------------------------------------- */
.presets { flex: 1; display: flex; min-height: 0; }
.ps-list { width: clamp(190px, 32%, 300px); flex: none; overflow: auto; border-right: 1px solid #D6D2C2; background: #fff; padding: 4px 0 20px; }
.ps-group { padding: 8px 10px 3px; color: #0046D5; font-weight: bold; }
.ps-none { padding: 2px 12px 6px; line-height: 1.4; }
.ps-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 10px; cursor: pointer; outline: none; }
.ps-item:hover { background: #F1F5FD; }
.ps-item.sel, .ps-item.sel:hover { background: var(--select); color: #fff; }
.ps-item.sel .dim { color: #DDE6F7; }
.ps-item .ico { margin-top: 1px; flex: none; }
.ps-it { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ps-detail { flex: 1; overflow: auto; padding: 10px 14px 30px; display: flex; flex-direction: column; gap: 6px; background: #FCFCFE; }
.ps-desc { margin: 0; line-height: 1.5; max-width: 720px; }
.ps-row { display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(70px, 1fr) minmax(70px, 1fr); gap: 8px; padding: 1px 6px; }
.ps-row.diff { background: #FFF6D8; }
.ps-row.diff > :nth-child(2) { font-weight: bold; }
.ps-hrow { color: var(--muted); border-bottom: 1px solid #D6D2C2; margin-bottom: 2px; }
.ps-sec { color: #0046D5; padding: 6px 6px 1px; font-weight: bold; }

/* My Worlds list (old) and dialogs */
.wt-row.hm-row { grid-template-columns: minmax(0, 1fr) 110px 80px 100px; }
.extras .line { flex-wrap: wrap; }

/* Admin tab */
.admin { padding: 8px 12px 30px; overflow: auto; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
/* lists, group boxes and notes keep their full height; the admin page scrolls */
.admin > *, .admin .groupbox > * { flex-shrink: 0; }
.admin .seg { margin-bottom: 4px; }
.hours { display: grid; grid-template-columns: repeat(12, 26px); gap: 2px; }
.hours button { height: 20px; padding: 0; border: 1px solid #CECEC3; background: linear-gradient(#FEFEFE, #EBEAE5); font-size: 10px; }
.hours button.on { background: var(--select); color: #fff; border-color: #1E4C9A; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, .8fr) minmax(96px, 1.6fr); align-items: center; gap: 6px; padding: 2px 6px; min-height: 24px; }
.adm-row > span { min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
.adm-row + .adm-row { border-top: 1px solid #F0EFE8; }
.adm-head { background: linear-gradient(#fff, #F7F6F0 60%, #EBEADB); border-bottom: 1px solid #D6D2C2; }
/* click a column title to sort (admin.js sortTable) */
.adm-sort { cursor: pointer; user-select: none; border-radius: 2px; outline: none; }
.adm-sort:hover, .adm-sort:focus-visible { color: var(--link-hover); text-decoration: underline; }
.adm-sort.on { color: var(--link); font-weight: bold; }
.adm-arrow { display: inline-block; min-width: 1em; padding-left: 3px; font-size: 9px; vertical-align: 1px; }
@media (pointer: coarse) { .adm-sort { padding: 6px 2px; } }
.adm-btns { display: flex; gap: 3px; flex-wrap: wrap; }
.jb-row { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.8fr) minmax(56px, .5fr); }
.quota-grid { display: grid; grid-template-columns: 190px 90px auto; gap: 5px 8px; align-items: center; }

/* The map takes every touch itself (pan, pinch); the page scrolls around it. */
#map2d { touch-action: none; }

/* Phones and narrow windows: stack the panes and let the page scroll.
   The page you're on (map, library...) comes first, its side panel next,
   the blue task pane last. */
@media (max-width: 860px) {
  :root { --font: 13px Tahoma, "Segoe UI", Verdana, sans-serif; }
  h2, h3 { font-size: 13px; }
  html, body { overflow-x: hidden; overflow-y: auto; height: auto; }
  #app { height: auto; min-height: 100%; }
  #main { flex-direction: column; }
  #center { order: 1; min-height: 0; padding: 4px 0; }
  #sidebar { order: 2; width: auto; border-left: 0; border-top: 1px solid #D6D2C2; max-height: 80vh; max-height: 80svh; }
  #taskpane { order: 3; width: auto; padding: 10px; }
  #menubar { overflow-x: auto; scrollbar-width: none; }
  #menubar .mb { padding: 6px 10px; flex: none; }
  /* One swipeable row each instead of four wrapped ones. */
  .tabs, #tab-map .map-strip { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar, #tab-map .map-strip::-webkit-scrollbar, #menubar::-webkit-scrollbar { display: none; }
  .tab { flex: none; white-space: nowrap; }
  #tab-map .map-strip .seg { flex-wrap: nowrap; flex: none; }
  #tab-map .map-strip > * { flex: none; }
  .lib-head input[type=search] { flex: 1 1 100%; width: auto; }
  .lib-head select { max-width: 100%; }
  .lib-count { margin-left: 0; }
  .map-source { display: none; }
  #tab-map .map-wrap { flex: none; height: 62vh; height: 62svh; min-height: 280px; }
  .sea-bar { flex-wrap: wrap; row-gap: 4px; }
  #hypso { width: 100%; height: 36px; order: 9; }
  .map-panel { width: auto; left: 8px; right: 8px; max-height: calc(100% - 16px); }
  .map-panel .inspect-kv { max-width: none; }
  .map-legend { max-width: calc(100% - 100px); }
  .profile-panel { left: 0; right: 0; }
  /* Windows fill the screen's width and scroll inside. */
  .modal-back { padding: 6px; }
  #dialogs .win { min-width: 0; width: 100% !important; max-width: 100%; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); }
  #dialogs .win.resizable { height: auto !important; min-height: 0; }
  .win-grip { display: none; }
  .win-buttons { flex-wrap: wrap; }
  .menu { max-width: calc(100vw - 8px); max-height: calc(100vh - 60px); overflow-y: auto; }
  .menu .mi { white-space: normal; }
  .statusbar .grip, #statusbar .grip { display: none; }
  .lib, .presets { flex-direction: column; }
  .lib-detail, .ps-list { width: auto; border-left: 0; border-right: 0; border-top: 1px solid #D6D2C2; }
  .ps-list { max-height: 260px; }
  #map-readout, #sb-size { display: none; }
  .adm-row, .up-row, .admin .adm-row.adm-row { grid-template-columns: 1fr; }
  /* the column titles become a row of sort buttons */
  .adm-row.adm-head { display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .adm-head > span:not(.adm-sort) { display: none; }
  .admin { padding: 6px; }
  .ls-mid { flex-direction: column; gap: 18px; }
  .ls-left { align-items: center; text-align: center; padding: 0; width: auto; }
  .ls-divider { display: none; }
  .ls-users { padding: 0; width: min(400px, 100%); }
  .ls-top { height: 40px; }
  .ls-bottom { height: auto; padding: 10px 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .ls-fine { text-align: left; }
  #toolbar .tbtn span:not(.ico) { display: none; }
  #toolbar .tbtn { flex: none; min-width: 28px; padding: 0 4px; }
  .acct-name { max-width: 90px; }
}

/* Touch screens: finger-sized targets, and 16px text in fields so iPhones
   don't zoom the page when one is focused. */
@media (pointer: coarse) {
  input[type=text], input[type=search], input[type=number], input:not([type]), select, textarea { font-size: 16px; height: 32px; }
  textarea { height: auto; }
  input[type=range] { height: 28px; }
  input[type=checkbox], input[type=radio] { width: 18px; height: 18px; }
  .btn, a.btn { height: 34px; }
  .btn.small { height: 30px; }
  .seg button, .seg.small button { height: 32px; padding: 0 9px; }
  .tbtn { height: 40px; min-width: 40px; justify-content: center; }
  .icon-btn { width: 32px; height: 32px; }
  .win-close { width: 30px; height: 26px; }
  .win-title { height: 34px; }
  .tab { padding: 7px 14px 8px; }
  .menu .mi { padding: 9px 18px 9px 6px; }
  .tp-link { padding: 4px 0; }
  .map-panel .mp-head { height: 30px; }
  .map-panel .mp-head .icon-btn { width: 26px; height: 24px; }
}

/* the 3D view's wind bar (view3d.js) on the XP yellow overlay */
.wind-bar > span[style] { color: var(--muted) !important; }

/* start-up failure (boot.js) */
.boot-error { background: #fff; color: #000; border: 1px solid #0831D9; border-radius: 6px; padding: 14px 18px; max-width: 560px; display: flex; flex-direction: column; gap: 8px; box-shadow: 3px 3px 10px rgba(0, 0, 40, .35); font: 12px Tahoma, sans-serif; word-break: break-word; }
.boot-error b { font-size: 14px; color: #C8261B; }
.boot-btns { display: flex; gap: 6px; }
.boot-hint { color: #555; }

/* Admin: everyone's worlds and uploads */
.admin-filters { flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-filters input[type=search] { width: 200px; }
.admin-grid { padding: 0; background: transparent; overflow: visible; }
.up-admin-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, .6fr) minmax(96px, 1.5fr); }
.admin-log { max-height: 65vh; min-width: min(900px, 80vw); overflow: auto; white-space: pre-wrap; }

/* Admin lists take their rows' height and the admin page scrolls. Without
   this, Firefox gives a list whose body is "flex: 1" in a column of
   unknown height a body of zero height (all you see is the top border). */
.admin .lv { flex: none; }
.admin .lv-body { flex: none; overflow: visible; }
.us-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(96px, 1.6fr); }
/* buttons wrap onto a second line instead of being cut off */
.adm-row > .adm-btns { white-space: normal; overflow: visible; }
.adm-row > .adm-btns .btn.small { padding: 1px 6px; min-width: 0; }
.au-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, .9fr); }
.au-row .au-what b { font-weight: bold; }
.au-row.sys { color: var(--muted); }

/* The side panel: World Options (Map) or the selected world (Library) */
#side-options, #side-detail { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#side-options[hidden], #side-detail[hidden], #sidebar[hidden] { display: none !important; }
.side-detail { padding: 8px 8px 24px; display: flex; flex-direction: column; gap: 6px; background: #FCFCFE; }
.side-detail > * { flex-shrink: 0; }
.side-detail .ld-thumb { margin: -2px 0 2px; }
.side-detail .kv { grid-template-columns: 110px 1fr; }
.side-detail .band { grid-template-columns: 18px minmax(0, 1.3fr) 64px minmax(0, 1fr); }
.side-detail .bb { grid-template-columns: 12px minmax(0, 1fr) 70px 32px; }
.lib-card { user-select: none; }

/* the public library */
.lib-pub { position: absolute; top: 6px; left: 6px; background: #2160D8; color: #fff; border-color: #1E3F80; }
.ld-head .lib-pub { position: static; }
.pub-by { color: var(--muted); }
.pub-note { margin: 0; line-height: 1.5; white-space: pre-wrap; }
.pub-hint { padding: 4px 8px 0; }
.btn.on-pub { color: #1E4C9A; font-weight: bold; }

/* choosing a username (welcome screen) */
.ls-name-box { display: flex; flex-direction: column; gap: 8px; background: rgba(0, 30, 120, .25); padding: 12px; border-radius: 6px; line-height: 1.5; }
.ls-name-row { display: flex; gap: 6px; }
.ls-name { flex: 1; font-size: 15px; padding: 4px 6px; }
.ls-go { min-width: 90px; }
.ls-name-msg { min-height: 18px; }
.ls-name-msg.ok { color: #C9F7C1; }
.ls-name-msg.bad { color: #FFD9D3; font-weight: bold; }

/* Changelog */
#tab-changelog { overflow: auto; }
.cl { max-width: 760px; padding: 12px 18px 30px; }
.cl-h1 { margin: 0 0 4px; font: bold 18px "Trebuchet MS", Tahoma, sans-serif; color: #2E4E9E; }
.cl-h2 { margin: 16px 0 4px; font: bold 14px "Trebuchet MS", Tahoma, sans-serif; color: #2E4E9E; border-bottom: 1px solid #D0D0BF; padding-bottom: 2px; }
.cl-p { margin: 0 0 6px; color: #555; }
.cl-list { margin: 4px 0 0; padding-left: 20px; }
.cl-list li { margin: 3px 0; line-height: 1.4; }
.cl code { background: #F1F1EA; border: 1px solid #DDDDD0; border-radius: 2px; padding: 0 3px; font-size: 0.95em; }

/* Feedback */
#tab-feedback { overflow: auto; }
.fb { display: flex; gap: 16px; padding: 12px 14px 30px; align-items: flex-start; flex-wrap: wrap; }
.fb-form { flex: 1 1 420px; max-width: 680px; display: flex; flex-direction: column; gap: 8px; }
.fb-h { margin: 0; font: bold 15px "Trebuchet MS", Tahoma, sans-serif; color: #2E4E9E; }
.fb-grid { grid-template-columns: 70px 1fr; }
.fb-grid textarea { resize: vertical; }
.fb-ctx { gap: 6px; }
.fb-mine { flex: 1 1 320px; max-width: 520px; display: flex; flex-direction: column; gap: 6px; }
.fb-list { display: flex; flex-direction: column; gap: 6px; }
.fb-item { border: 1px solid #D0D0BF; border-radius: 4px; background: #fff; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.fb-top { display: flex; align-items: center; gap: 6px; }
.fb-top b { flex: 1; min-width: 0; }
.fb-body { white-space: pre-wrap; word-break: break-word; max-height: 8em; overflow: auto; }
.fb-reply { background: #F1F5FD; border-left: 3px solid #2160D8; padding: 4px 6px; white-space: pre-wrap; }
.fb-admin { max-width: 980px; }
.fb-tools { align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.fb-tools textarea { flex: 1 1 300px; resize: vertical; }
.note.warn-note { background: #FFF4D6; border-color: #E0B040; }

/* New Project */
.win.np-win { width: 980px; max-width: calc(100vw - 40px); }
.np { display: flex; gap: 14px; min-width: 0; max-height: 70vh; }
.np-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.np-col:first-child { flex: 0 1 280px; min-width: 200px; }
.np-ups { flex: 1; }
.np-uphead { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.np-uphead input { width: 160px; }
.np-drop { flex: 1; min-height: 240px; border: 2px dashed #7F9DB9; border-radius: 6px; background: #F5F8FE; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; cursor: pointer; }
.np-drop:hover, .np-drop.over, .np-drop:focus-visible { background: #E3ECFB; border-color: #2160D8; outline: none; }
.np-drop .big { width: 44px; height: 44px; }
.np-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; padding: 2px; }
.np-tile { display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; padding: 4px; border: 1px solid #D0D0BF; border-radius: 4px; background: #fff; cursor: pointer; font: inherit; }
.np-tile:hover, .np-tile:focus-visible { border-color: #316AC5; box-shadow: 0 0 0 2px #316AC5; outline: none; }
.np-tile img, .np-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #3A4448; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #C8D0D8; }
.np-tile b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-expiry { color: #5A6470; font-size: 11px; }
.np-expiry.soon { color: #B03A1E; font-weight: bold; }
.np-acts { display: flex; gap: 4px; margin-top: 2px; }
.np-acts .btn { flex: 1; padding-left: 2px; padding-right: 2px; }
.np-limits { margin-top: 4px; max-width: 240px; text-align: center; }
@media (max-width: 860px) { .np { flex-direction: column; min-width: 0; max-height: none; } .np-col:first-child { flex: none; } }

/* Map Size: width × height, scale, real-world scale */
.size-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.size-row .pnum { width: 80px; }
.size-row input[type=range] { flex: 1; }
.size-keep { margin: 2px 0; gap: 4px; }
.scale-grid { display: grid; grid-template-columns: 1fr 90px; gap: 3px 6px; align-items: center; }
.scale-grid .pnum { width: 90px; }
.scale-out { display: flex; flex-direction: column; gap: 3px; }

/* Feedback screenshots */
.fb-shot { display: flex; gap: 8px; align-items: flex-start; }
.fb-shot img { max-width: 160px; max-height: 100px; border: 1px solid #A0A0A0; }
.fb-shot .btn { margin-right: 4px; }
.fb-shotlink img { display: block; max-width: 100%; max-height: 220px; margin: 4px 0; border: 1px solid #A0A0A0; cursor: zoom-in; }

/* Activity: hide accounts */
.au-hide { margin-left: 4px; opacity: 0; }
.au-row:hover .au-hide { opacity: .7; }
.au-hide:hover { opacity: 1; }
.au-hide-list { max-height: 50vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; margin-top: 6px; }

/* application form (welcome screen, accounts waiting for approval) */
.ls-users.ls-apply { width: 560px; }
.ls-app-fields { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.ls-app-field { display: flex; flex-direction: column; gap: 2px; }
.ls-app-field > span { font-weight: bold; }
.ls-app-field input, .ls-app-field textarea { font: inherit; padding: 3px 5px; color: #000; resize: vertical; }
.ls-req { color: #FFD27A; }
@media (max-width: 860px) { .ls-users.ls-apply { width: min(560px, 100%); } }
.app-link { text-align: left; }
.app-view h3 { margin: 0 0 2px; }
.app-sec { margin-top: 10px; }
.app-text { white-space: pre-wrap; line-height: 1.5; margin-top: 2px; }

/* imported worlds, the import window, heightmap folders */
.lib-imp { position: absolute; bottom: 6px; left: 6px; background: #5B6E2E; color: #fff; border-color: #3C4A1C; }
.ld-head .lib-imp { position: static; }
.imp-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.imp-list { max-height: 52vh; overflow: auto; border: 1px solid #A0A0A0; background: #fff; }
.imp-row { display: grid; grid-template-columns: 22px minmax(150px, 1.4fr) 92px 70px minmax(140px, 1.2fr) 130px; gap: 6px; align-items: center; padding: 3px 6px; border-bottom: 1px solid #EEE; }
.imp-row.imp-head { position: sticky; top: 0; background: #ECE9D8; font-weight: bold; z-index: 1; }
.imp-row.skip { color: #8C8A7E; }
.imp-row input[type=text], .imp-row select { width: 100%; min-width: 0; font: inherit; }
.imp-row .imp-path { font-size: 11px; color: #6A6A6A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-kind { font-size: 11px; }
.imp-kind.world { color: #1E6A2E; } .imp-kind.draft { color: #8A5A00; } .imp-kind.skip { color: #8C8A7E; }
.imp-prog { margin-top: 6px; }
.imp-prog .bar { height: 12px; border: 1px solid #7A96C2; background: #fff; }
.imp-prog .bar > div { height: 100%; background: linear-gradient(#8CB4F0, #3F74D0); width: 0; }
.hmf-row { grid-template-columns: 22px minmax(160px, 1.5fr) 110px 70px 80px minmax(120px, 1fr); }
@media (max-width: 860px) { .imp-row, .hmf-row { grid-template-columns: 22px 1fr; } }
.win.imp-win { width: 1060px; max-width: calc(100vw - 40px); }

/* the side panel's width: drag its left edge */
#side-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 5; }
#side-resize:hover, #side-resize.on { background: linear-gradient(90deg, transparent 3px, #7F9DB9 3px 5px, transparent 5px); }
body.side-dragging, body.side-dragging * { cursor: col-resize !important; user-select: none !important; }

/* Library folders */
.lib-folders { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 3px 8px; border-bottom: 1px solid #D6D2C2; background: #F4F3EE; }
.lib-folders .fold { border: 1px solid transparent; background: none; padding: 2px 8px; border-radius: 3px; font: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.lib-folders .fold:hover { border-color: #B8B39E; background: #fff; }
.lib-folders .fold.on { border-color: #316AC5; background: #fff; font-weight: bold; }
.lib-folders .fold.drop { border-color: #2FB52F; background: #E8F8E8; }
.lib-folders .fold .n { color: var(--muted); font-weight: normal; font-size: 11px; }
.lib-folders .fsep { width: 1px; align-self: stretch; background: #CFCBB8; margin: 2px 4px; }
.lib-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-weight: bold; color: #1E3F80; padding: 4px 2px 0; border-bottom: 1px solid #C9D6EA; }
.lib-group .dim { font-weight: normal; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.lib-chip { font-size: 10px; padding: 0 5px; border-radius: 8px; background: #E4E9F4; border: 1px solid #C2CCE0; color: #2B3F66; }
.lib-owner { font-size: 11px; color: var(--muted); }
.ld-folders { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ld-admin { border-top: 1px dashed #D0CCB8; padding-top: 4px; align-items: center; }
img.avatar { border-radius: 3px; vertical-align: middle; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.sec-badge { margin-left: 4px; font-size: 10px; padding: 0 4px; }
.ls-purposes { display: flex; gap: 16px; flex-wrap: wrap; }
.ls-purpose { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-weight: normal; }
.side-preset { gap: 4px; margin-bottom: 4px; }
.side-preset select { flex: 1; min-width: 0; }
.side-preset:empty { display: none; }
.ps-what { margin: 4px 6px 6px; }
/* empty Library: the message in the middle of the space */
.lib-grid > .empty-state { grid-column: 1 / -1; justify-self: center; align-self: center; margin: 0 auto; text-align: center; max-width: 460px; }
.lib-grid:has(> .empty-state) { align-content: center; grid-auto-rows: auto; }
.au-live { font-size: 11px; color: var(--muted); }
.au-live.on { color: #1E8A2E; font-weight: bold; }
.au-live.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2FB52F; margin-right: 4px; animation: au-pulse 1.6s ease-in-out infinite; }
@keyframes au-pulse { 50% { opacity: .3; } }
.au-row.au-new { animation: au-flash 2.5s ease-out; }
@keyframes au-flash { from { background: #FFF3B0; } to { background: transparent; } }
.lib-kind button { font-weight: bold; }
img.hm-old { filter: grayscale(1) contrast(1.1); }
/* the world's own description, under its owner line */
.ld-about { border: 1px solid #C9D6EA; background: #F4F8FE; border-radius: 3px; padding: 5px 8px 6px; margin: 2px 0 4px; }
.ld-about-t { font-weight: bold; color: #1E3F80; font-size: 11px; margin-bottom: 2px; }
.ld-about-b { white-space: pre-wrap; line-height: 1.45; overflow-wrap: anywhere; }
button.ld-about-empty { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left; color: var(--muted); border-style: dashed; cursor: pointer; font: inherit; }
button.ld-about-empty:hover { color: #1E3F80; border-color: #7F9DB9; }
.ld-about-t { display: flex; align-items: center; }
.ld-about-edit { margin-left: auto; font-weight: normal; font-size: 11px; }
/* Get the Mod / Install in Game (modsetup.js) and Admin > Mod (modadmin.js) */
.ms { max-width: 640px; }
.ms-step { display: flex; gap: 10px; margin: 10px 0; }
.ms-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #2E66C8; color: #fff; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.ms-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ms-body ul { margin: 0; padding-left: 18px; }
.ms code, .ms-table code, .ms-result code { font-family: Consolas, 'Lucida Console', monospace; font-size: 11px; background: #F2F2EC; padding: 0 3px; border-radius: 2px; overflow-wrap: anywhere; }
.ms-copy { display: flex; gap: 6px; align-items: center; border: 1px solid #C9D6EA; background: #F4F8FE; border-radius: 3px; padding: 4px 6px; }
.ms-copy code { flex: 1; min-width: 0; background: none; font-size: 12px; user-select: all; }
.ms-fresh { border: 1px solid #8DBE8D; background: #F1FAF0; border-radius: 3px; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
table.ms-paths, table.ms-table { border-collapse: collapse; font-size: 11px; }
table.ms-paths td { padding: 1px 10px 1px 0; vertical-align: top; }
table.ms-table { width: 100%; background: #fff; border: 1px solid var(--input-border); }
table.ms-table th { text-align: left; font-weight: normal; background: linear-gradient(#fff, #F7F6F0 60%, #EBEADB); border-bottom: 1px solid #D6D2C2; padding: 3px 6px; }
table.ms-table td { padding: 2px 6px; border-bottom: 1px solid #F0EFE6; }
.ms-result { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ms-manual { margin-top: 8px; }
.ms-manual summary { cursor: pointer; color: #1E3F80; }
@media (max-width: 860px) { .ms-step { gap: 6px; } table.ms-table { display: block; overflow-x: auto; } }

/* Wind panel: the four edge multipliers in a 2x2 grid */
.wind-edges { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 4px; }
.wind-edges label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wind-edges .pnum { width: 60px; }

/* -- guided tour: a grey speech bubble with an orange outline (tour.js) --
   Absolute on the body (which never scrolls), not a full-window cover. */
.tour-bubble { position: absolute; z-index: 1200; width: 340px; max-width: calc(100vw - 24px); background: #E9E9E6; color: #000; border: 2px solid #F0841A; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); padding: 9px 11px 9px; font: var(--font); line-height: 1.45; }
.tour-bubble::before { content: ''; position: absolute; width: 12px; height: 12px; background: #E9E9E6; border: 2px solid #F0841A; transform: rotate(45deg); }
.tour-bubble.mid::before { display: none; }
.tour-bubble.at-below::before { top: -8px; left: calc(var(--ax, 30px) - 8px); border-right: none; border-bottom: none; }
.tour-bubble.at-above::before { bottom: -8px; left: calc(var(--ax, 30px) - 8px); border-left: none; border-top: none; }
.tour-bubble.at-right::before { left: -8px; top: calc(var(--ay, 30px) - 8px); border-right: none; border-top: none; }
.tour-bubble.at-left::before { right: -8px; top: calc(var(--ay, 30px) - 8px); border-left: none; border-bottom: none; }
.tour-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tour-count { flex: none; background: #F0841A; color: #fff; font-weight: bold; border-radius: 9px; padding: 1px 8px; font-size: 11px; }
.tour-title { flex: 1; min-width: 0; font-size: 12px; }
.tour-x { flex: none; width: 20px; height: 20px; border: 1px solid #B8B6AC; border-radius: 3px; background: #F5F5F2; cursor: pointer; font-size: 14px; line-height: 16px; padding: 0; color: #444; }
.tour-x:hover { background: #fff; border-color: #F0841A; color: #000; }
.tour-text p { margin: 4px 0; }
.tour-text .dim { color: #555; }
.tour-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; }
.tour-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #B07030; background: #fff; padding: 0; cursor: pointer; }
.tour-dot.past { background: #F7C48E; }
.tour-dot.on { background: #F0841A; border-color: #C05F00; }
.tour-btns { display: flex; align-items: center; gap: 6px; }
.tour-grow { flex: 1; }
.tour-skip { color: #444; }
.tour-ring { position: absolute; z-index: 1190; pointer-events: none; border: 2px solid #F0841A; border-radius: 5px; box-shadow: 0 0 0 3px rgba(240, 132, 26, .28); animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 6px rgba(240, 132, 26, .12); } }
@media (prefers-reduced-motion: reduce) { .tour-ring { animation: none; } }

/* -- Install in Game: the three-step window (modsetup.js) -- */
.wiz { min-height: 360px; }
.wiz-steps { display: flex; gap: 4px; flex-wrap: wrap; }
.wiz-step { flex: 1 1 150px; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #C9D6EA; background: #F4F8FE; border-radius: 3px; cursor: pointer; text-align: left; font: inherit; color: #1E3F80; }
.wiz-step.cur { background: #fff; border-color: #2E66C8; font-weight: bold; box-shadow: inset 0 -2px 0 #2E66C8; }
.wiz-step.done { color: #2E6B23; border-color: #8DBE8D; background: #F1FAF0; }
.wiz-n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #2E66C8; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 11px; }
.wiz-step.done .wiz-n { background: #3C9A2E; }
.wiz-page { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wiz .ms-num { font-size: 11px; }
.wiz-count { margin-right: auto; color: var(--muted); align-self: center; }
.note.ok-note { background: #F1FAF0; border-color: #8DBE8D; }
.wiz .form-grid { grid-template-columns: 100px 1fr; }

/* guest accounts (logged in, not approved): the public library only */
.guest-note { max-width: 520px; margin: 4px auto; text-align: left; }
#tab-library .guest-note { max-width: none; margin: 6px 8px 0; }
.guest-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.acct-menu .am-guest { padding: 4px 10px 6px; max-width: 260px; white-space: normal; line-height: 1.4; }
.ls-apply-dlg { width: 560px; max-width: 100%; }
.ls-apply-dlg .ls-app-fields { margin-top: 6px; }
.ls-apply-dlg .ls-req { color: #C00000; }
.ls-apply-dlg .ls-purposes { display: flex; gap: 14px; flex-wrap: wrap; font-weight: normal; }
.ls-apply-dlg .ls-name-msg.bad { color: #C00000; }
