/* Fable Edition — every style on the page: the base page, the HUD, the item screens and the menus.
 * Sharp corners only, no sideways scrolling: long text wraps or ends in an ellipsis, and every
 * scrolling box scrolls up and down only. */

/* ---- the palette ----
 * game.html links no fleet theme (the game page loads only this stylesheet), so these lines are
 * the one place a colour is written as a literal; every rule below uses the tokens. */
:root {
  --fe-accent: #ffe9a8; --fe-accent-hi: #fff7dc;                                        /* fleet-ratchet: allow */
  --fe-text: #ece9e2; --fe-white: #fff; --fe-black: #000; --fe-ink-debug: #dfe9df;      /* fleet-ratchet: allow */
  --fe-health: #e5484d; --fe-hunger: #f0a43a; --fe-air: #5ab0f0;                        /* fleet-ratchet: allow */
  --fe-bad: #ff9a9d; --fe-good: #8fdc9a;                                                /* fleet-ratchet: allow */
  --fe-sb-track: #2b2b2b; --fe-sb-thumb: #333; --fe-sb-hover: #3c3c3c; --fe-sb-line: #484848; /* fleet-ratchet: allow */
}

/* ---- the page ---- */
html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: var(--fe-black); }
#gl { display: block; width: 100vw; height: 100vh; }
#ui {
  --fe-accent-soft: rgba(255, 233, 168, 0.16);
  --fe-accent-line: rgba(255, 233, 168, 0.6);
  --fe-panel: rgba(12, 14, 18, 0.78);
  --fe-hud: rgba(12, 14, 18, 0.5);
  --fe-line: rgba(255, 255, 255, 0.2);
  --fe-rule: rgba(255, 255, 255, 0.09);
  --fe-slot: rgba(0, 0, 0, 0.35);
  --fe-slot-line: rgba(255, 255, 255, 0.16);
  --fe-well: rgba(0, 0, 0, 0.42);
  --fe-dim: rgba(236, 233, 226, 0.66);
  --fe-faint: rgba(236, 233, 226, 0.4);
  --fe-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fe-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  color: var(--fe-text);
  font: 14px/1.35 var(--fe-body);
  user-select: none;
  -webkit-user-select: none;
}
#ui *, #ui *::before, #ui *::after { box-sizing: border-box; }
#ui [hidden] { display: none !important; }
#ui img { image-rendering: pixelated; }
#ui button, #ui input { font-family: inherit; }

/* Scrollbars: 12px, square, no arrow buttons (scoped, never page-wide). */
#ui *::-webkit-scrollbar { width: 12px; height: 12px; }
#ui *::-webkit-scrollbar-track { background: var(--fe-sb-track); border-left: 1px solid var(--fe-sb-line); }
#ui *::-webkit-scrollbar-thumb { background: var(--fe-sb-thumb); border: 1px solid var(--fe-sb-line); }
#ui *::-webkit-scrollbar-thumb:hover { background: var(--fe-sb-hover); }
#ui *::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
#ui *::-webkit-scrollbar-corner { background: var(--fe-sb-track); }

.fe-label {
  font-family: var(--fe-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- buttons and fields ---- */
.fe-btn {
  flex: none;
  height: 30px;
  padding: 0 12px;
  color: var(--fe-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font: 600 11px/1 var(--fe-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}
.fe-btn:hover:not(:disabled) { color: var(--fe-white); background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.65); }
.fe-btn:active:not(:disabled) { background: rgba(255, 255, 255, 0.22); }
.fe-btn:focus { outline: none; }
.fe-btn:focus-visible { outline: 1px solid var(--fe-accent); outline-offset: 1px; }
.fe-btn:disabled { opacity: 0.38; cursor: default; border-style: dashed; }
.fe-primary { color: var(--fe-accent); background: rgba(255, 233, 168, 0.08); border-color: var(--fe-accent-line); }
.fe-primary:hover:not(:disabled) { color: var(--fe-accent-hi); background: rgba(255, 233, 168, 0.2); border-color: var(--fe-accent); }
.fe-danger { color: var(--fe-bad); border-color: rgba(229, 72, 77, 0.6); }
.fe-danger:hover:not(:disabled) { color: var(--fe-white); background: rgba(229, 72, 77, 0.24); border-color: var(--fe-health); }
.fe-x { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.fe-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }

.fe-input {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  color: var(--fe-text);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font: 14px var(--fe-body);
  outline: none;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}
.fe-input:focus { border-color: var(--fe-accent); background: rgba(0, 0, 0, 0.55); }
.fe-input::placeholder { color: var(--fe-faint); }
.fe-input:disabled { opacity: 0.55; }

.fe-seg { display: flex; min-width: 0; }
.fe-segb {
  flex: 1 1 0;
  min-width: 0;
  margin-left: -1px;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.fe-segb:first-child { margin-left: 0; }
.fe-segb.fe-on, .fe-toggle.fe-on {
  position: relative;
  z-index: 1;
  color: var(--fe-accent);
  background: var(--fe-accent-soft);
  border-color: var(--fe-accent);
}

/* ---- the HUD ---- */
.fe-hud { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fe-hudpanel { background: var(--fe-hud); border: 1px solid var(--fe-line); }
.fe-ui.fe-open .fe-cross,
.fe-ui.fe-open .fe-hotbar,
.fe-ui.fe-open .fe-flash { visibility: hidden; }

.fe-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9));
}
.fe-cross::before, .fe-cross::after { content: ""; position: absolute; background: var(--fe-white); }
.fe-cross::before { left: 8px; top: 0; width: 2px; height: 18px; }
.fe-cross::after { left: 0; top: 8px; width: 18px; height: 2px; }

.fe-hudleft {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: max(212px, calc(50vw - 262px));
}
.fe-vitals { width: 212px; padding: 8px 10px 9px; display: flex; flex-direction: column; gap: 7px; }
.fe-vtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fe-vnum { font: 600 12px/1 var(--fe-mono); color: var(--fe-text); }
.fe-vbar { position: relative; height: 8px; margin-top: 4px; background: var(--fe-well); border: 1px solid rgba(255, 255, 255, 0.14); overflow: hidden; }
.fe-vbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--fe-bar); transition: width 0.15s linear; }
.fe-vbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), rgba(0, 0, 0, 0.5) calc(10% - 1px), rgba(0, 0, 0, 0.5) 10%);
}
.fe-v-health { --fe-bar: var(--fe-health); }
.fe-v-hunger { --fe-bar: var(--fe-hunger); }
.fe-v-air { --fe-bar: var(--fe-air); }
.fe-v-air .fe-vbar::after { background: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), rgba(0, 0, 0, 0.5) calc(20% - 1px), rgba(0, 0, 0, 0.5) 20%); }
.fe-vrow .fe-label { color: var(--fe-bar); }
.fe-v-health.fe-low .fe-vbar i { animation: fe-blink 0.9s steps(2, jump-none) infinite; }
@keyframes fe-blink { from { opacity: 1; } to { opacity: 0.35; } }
.fe-vcreative { color: var(--fe-accent); font-size: 12px; padding: 1px 0; }

.fe-debug {
  margin: 0;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  padding: 6px 8px;
  overflow: hidden;
  color: var(--fe-ink-debug);
  font: 12px/1.4 var(--fe-mono);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.fe-clock { position: absolute; right: 10px; top: 10px; max-width: 40vw; padding: 7px 11px 8px; text-align: right; }
.fe-clock1 { color: var(--fe-accent); font-size: 13px; }
.fe-clock2 { margin-top: 3px; color: var(--fe-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fe-hotbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; }
.fe-hotbar .fe-slot.fe-sel { border-color: var(--fe-accent); box-shadow: 0 0 0 1px var(--fe-accent); }

.fe-flash {
  position: absolute;
  left: 50%;
  bottom: 80px;
  max-width: 80vw;
  transform: translateX(-50%);
  color: var(--fe-white);
  font: 600 15px var(--fe-body);
  text-shadow: 0 1px 2px var(--fe-black), 0 0 8px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s;
}
.fe-toast {
  position: absolute;
  left: 50%;
  bottom: 108px;
  z-index: 45;
  max-width: min(640px, 90vw);
  transform: translateX(-50%);
  padding: 5px 14px;
  color: var(--fe-text);
  background: var(--fe-panel);
  border: 1px solid var(--fe-line);
  text-align: center;
  overflow-wrap: anywhere;
  transition: opacity 0.3s;
}
.fe-ui.fe-open .fe-toast { bottom: auto; top: 6px; padding: 3px 12px; }
.fe-gone { opacity: 0; }

/* ---- slots ---- */
.fe-slot { position: relative; flex: none; width: 50px; height: 50px; background: var(--fe-slot); border: 1px solid var(--fe-slot-line); }
.fe-screens .fe-slot:hover { border-color: rgba(255, 255, 255, 0.62); background: rgba(255, 255, 255, 0.07); }
.fe-ico { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; pointer-events: none; }
.fe-n {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: var(--fe-white);
  font: 700 13px/1 var(--fe-mono);
  text-shadow: 1px 1px 0 var(--fe-black), -1px 0 2px var(--fe-black), 0 0 3px var(--fe-black);
  pointer-events: none;
}
.fe-wear { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: var(--fe-black); pointer-events: none; }
.fe-wear i { display: block; height: 100%; }
.fe-result { width: 58px; height: 58px; border-color: var(--fe-accent-line); }
.fe-held { position: fixed; left: 0; top: 0; z-index: 50; width: 48px; height: 48px; background: none; border: 0; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.5)); }
.fe-bin svg { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; fill: none; stroke: var(--fe-bad); stroke-width: 1.4; pointer-events: none; }
.fe-bin { border-color: rgba(229, 72, 77, 0.45); }

.fe-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 55;
  max-width: 260px;
  padding: 5px 9px 6px;
  background: rgba(10, 9, 16, 0.95);
  border: 1px solid rgba(255, 233, 168, 0.45);
  pointer-events: none;
}
.fe-tipt { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.fe-tipl { margin-top: 2px; color: var(--fe-dim); font: 11px/1.4 var(--fe-mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- screens ---- */
.fe-screens { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.fe-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; pointer-events: auto; }
.fe-veil { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }
.fe-layer-pause .fe-veil, .fe-layer-settings .fe-veil { background: rgba(0, 0, 0, 0.55); }
.fe-layer-death .fe-veil { background: rgba(60, 0, 4, 0.6); }

.fe-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  background: var(--fe-panel);
  border: 1px solid var(--fe-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.fe-phead {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--fe-rule);
}
.fe-ptitle { min-width: 0; color: var(--fe-accent); font-size: 12px; overflow-wrap: anywhere; }
.fe-pbody { min-height: 0; padding: 12px 14px 14px; }
.fe-pfoot { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--fe-rule); }
.fe-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fe-sec { margin: 0 0 6px; color: var(--fe-dim); }
.fe-grid9 { display: grid; grid-template-columns: repeat(9, 50px); gap: 4px; }
.fe-player { margin-top: 12px; }
.fe-hotgap { height: 8px; }

/* inventory and workbench */
.fe-craftbody { display: flex; align-items: stretch; gap: 16px; }
.fe-craft { flex: none; }
.fe-craftrow { display: flex; align-items: center; gap: 14px; }
.fe-cgrid { display: grid; gap: 4px; }
.fe-cgrid2 { grid-template-columns: repeat(2, 50px); }
.fe-cgrid3 { grid-template-columns: repeat(3, 50px); }
.fe-arrow { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--fe-dim); stroke-width: 1.6; }
.fe-recipecol { width: 300px; }
.fe-recipes {
  flex: 1 1 auto;
  height: 0;
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.fe-recipe { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); opacity: 0.4; }
.fe-recipe.fe-can { opacity: 1; cursor: pointer; }
.fe-recipe.fe-can:hover { background: rgba(255, 233, 168, 0.1); }
.fe-rico { flex: none; width: 32px; height: 32px; }
.fe-rmain { flex: 1 1 auto; min-width: 0; }
.fe-rline { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.fe-rname { min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-rcount { flex: none; color: var(--fe-accent); font: 600 12px var(--fe-mono); }
.fe-rneeds { display: flex; flex-wrap: wrap; gap: 0 9px; margin-top: 1px; }
.fe-chip { display: inline-flex; align-items: center; gap: 1px; color: var(--fe-dim); font: 11px var(--fe-mono); }
.fe-chip img { width: 24px; height: 24px; }
.fe-chip.fe-short { color: var(--fe-bad); }

/* kiln */
.fe-kiln { display: flex; align-items: center; gap: 18px; width: 482px; }
.fe-kcol { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fe-flame { position: relative; width: 16px; height: 28px; background: var(--fe-well); border: 1px solid var(--fe-slot-line); }
.fe-flame i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, var(--fe-health), var(--fe-hunger) 60%, var(--fe-accent)); }
.fe-flame.fe-lit { border-color: rgba(240, 164, 58, 0.7); }
.fe-kmid { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.fe-kprog { position: relative; width: 96px; height: 12px; background: var(--fe-well); border: 1px solid var(--fe-slot-line); }
.fe-kprog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--fe-accent); }
.fe-kstatus { color: var(--fe-dim); font-size: 10px; }
.fe-kinfo { flex: 1 1 auto; min-width: 0; }
.fe-kline { margin-bottom: 8px; font-size: 12px; overflow-wrap: anywhere; }
.fe-kline:last-child { margin-bottom: 0; }

/* creative */
.fe-search { width: 100%; margin-bottom: 8px; }
.fe-palette {
  height: 222px;
  padding: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.fe-palgrid { display: grid; grid-template-columns: repeat(auto-fill, 50px); gap: 4px; }
.fe-palnone { padding: 12px; color: var(--fe-dim); }
.fe-hotbin { display: flex; align-items: flex-start; gap: 12px; }

/* pause and death */
.fe-p-pause, .fe-p-death { width: 340px; }
.fe-menu { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.fe-menu .fe-btn { width: 100%; height: 38px; }
.fe-deathmsg { color: var(--fe-white); font: 600 22px/1.25 var(--fe-body); text-align: center; overflow-wrap: anywhere; }
.fe-deathday { margin-bottom: 8px; color: var(--fe-dim); text-align: center; }
.fe-p-death .fe-ptitle { color: var(--fe-health); }

/* settings */
.fe-p-settings { width: 980px; }
.fe-setbody {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 0 24px;
  overflow-y: auto;
  overflow-x: hidden;
}
.fe-setcol { min-width: 0; }
.fe-setgroup { margin-bottom: 14px; }
.fe-setgroup:last-child { margin-bottom: 0; }
.fe-setgroup .fe-sec { padding-bottom: 5px; border-bottom: 1px solid var(--fe-rule); color: var(--fe-accent); }
.fe-setrow { display: grid; grid-template-columns: 124px minmax(0, 1fr) 76px; align-items: center; gap: 10px; min-height: 34px; }
.fe-setlabel { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.fe-set-seg .fe-seg { grid-column: 2 / 4; height: 28px; }
.fe-set-seg .fe-segb { height: 28px; }
.fe-toggle { grid-column: 2; justify-self: start; width: 64px; height: 28px; }
.fe-setval { color: var(--fe-accent); font: 12px var(--fe-mono); text-align: right; white-space: nowrap; }
.fe-range { width: 100%; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; pointer-events: auto; }
.fe-range:focus { outline: none; }
.fe-range::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--fe-accent) 0, var(--fe-accent) var(--fill, 0%), rgba(255, 255, 255, 0.2) var(--fill, 0%));
}
.fe-range::-webkit-slider-thumb { width: 10px; height: 18px; margin-top: -7px; background: var(--fe-accent); border: 1px solid rgba(0, 0, 0, 0.7); -webkit-appearance: none; appearance: none; }
.fe-range:hover::-webkit-slider-thumb { background: var(--fe-accent-hi); }
.fe-range:focus-visible::-webkit-slider-thumb { outline: 1px solid var(--fe-white); }
.fe-range::-moz-range-track { height: 4px; background: rgba(255, 255, 255, 0.2); border: 0; }
.fe-range::-moz-range-progress { height: 4px; background: var(--fe-accent); }
.fe-range::-moz-range-thumb { width: 10px; height: 18px; background: var(--fe-accent); border: 1px solid rgba(0, 0, 0, 0.7); }
.fe-keys { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 4px 10px; font-size: 12px; }
.fe-key { justify-self: start; padding: 1px 6px; color: var(--fe-accent); border: 1px solid rgba(255, 233, 168, 0.35); font: 11px var(--fe-mono); text-transform: uppercase; white-space: nowrap; }
.fe-keywhat { min-width: 0; color: var(--fe-text); overflow-wrap: anywhere; }
.fe-keybtn { width: 150px; height: 26px; padding: 0 6px; color: var(--fe-accent); overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.04em; }
.fe-keybtn.fe-on { color: var(--fe-text); }
.fe-keys .fe-keyfixed { color: var(--fe-dim); }
.fe-keys .fe-key.fe-keyfixed { justify-self: start; border-color: transparent; padding: 0; }
.fe-keyfoot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.fe-keyhint { flex: 1; min-width: 0; color: var(--fe-dim); font-size: 12px; overflow-wrap: anywhere; }

/* ---- title ---- */
.fe-title {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 22px 16px;
  overflow: hidden;
  pointer-events: auto;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(64, 96, 140, 0.5), rgba(0, 0, 0, 0) 62%),
    linear-gradient(rgba(6, 9, 14, 0.6), rgba(0, 0, 0, 0.9));
}
.fe-twrap { display: flex; flex-direction: column; gap: 14px; width: min(840px, 100%); height: 100%; min-height: 0; }
.fe-thead { flex: none; text-align: center; }
.fe-tcubes { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.fe-tcubes img { width: 48px; height: 48px; }
.fe-tname {
  margin: 0;
  color: var(--fe-accent);
  font: 800 clamp(34px, 7.2vh, 66px)/1 var(--fe-mono);
  letter-spacing: 0.16em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.65), 0 0 32px rgba(255, 233, 168, 0.22);
  overflow-wrap: anywhere;
}
.fe-tsub { margin-top: 8px; color: var(--fe-dim); font: 15px var(--fe-body); letter-spacing: 0.04em; }
.fe-worlds { flex: 0 1 auto; min-height: 150px; }
.fe-wstatus { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--fe-dim); overflow-wrap: anywhere; }
.fe-wstatus.fe-err { color: var(--fe-bad); }
.fe-wstatustext { min-width: 0; }
.fe-wlist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.fe-wrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.fe-wrow:hover { background: rgba(255, 255, 255, 0.04); }
.fe-wrow.fe-new { background: rgba(255, 233, 168, 0.1); }
.fe-wmain { flex: 1 1 auto; min-width: 0; }
.fe-wname { color: var(--fe-white); font: 600 16px/1.3 var(--fe-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-wedit { width: 100%; height: 30px; font-weight: 600; }
.fe-wmeta { margin-top: 2px; color: var(--fe-dim); font-size: 12px; overflow-wrap: anywhere; }
.fe-werr { margin-top: 3px; color: var(--fe-bad); font-size: 12px; overflow-wrap: anywhere; }
.fe-wbtns { flex: none; display: flex; gap: 6px; }
.fe-newworld { flex: none; }
.fe-nwform { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.fe-nwname { flex: 2 1 150px; }
.fe-nwseed { flex: 1 1 110px; }
.fe-nwmode { flex: none; }
.fe-nwmode .fe-segb { flex: none; height: 32px; padding: 0 12px; }
.fe-nwform > .fe-btn { height: 32px; }
.fe-nwmsg { padding: 0 14px 12px; color: var(--fe-good); font-size: 12px; overflow-wrap: anywhere; }
.fe-nwmsg.fe-err { color: var(--fe-bad); }

/* ---- the delete box ---- */
.fe-modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 12px; pointer-events: auto; }
.fe-modal .fe-veil { background: rgba(0, 0, 0, 0.62); }
.fe-confirm { width: min(440px, 100%); }
.fe-ctext { padding: 16px 14px; font-size: 14px; overflow-wrap: anywhere; }

/* ---- loading ---- */
/* the contract's own loading veil (showLoading): game.html loads no fleet-ui.js */
.fe-loading { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(4, 6, 9, 0.94); pointer-events: auto; } /* fleet-ratchet: allow */
.fe-loadbox { width: min(420px, 80vw); text-align: center; }
.fe-loadtext { margin-bottom: 10px; color: var(--fe-dim); font: 12px var(--fe-mono); text-transform: uppercase; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.fe-loadbar { position: relative; height: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--fe-line); }
.fe-loadbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--fe-accent); transition: width 0.2s; }
.fe-loadpct { margin-top: 8px; color: var(--fe-accent); font: 12px var(--fe-mono); }

/* ---- short windows ---- */
@media (max-height: 700px) {
  .fe-palette { height: 168px; }
  .fe-tcubes img { width: 32px; height: 32px; }
  .fe-tcubes { margin-bottom: 4px; }
  .fe-title { padding: 14px 16px; }
  .fe-twrap { gap: 10px; }
}

/* ---- touch controls (phones and tablets; js/touch.js) ----
   Below the screens and the title, above the HUD. The layer takes every finger on the world;
   the HUD under it stays visible and the hotbar is hit-tested by position. */
.fe-touch { position: absolute; inset: 0; z-index: 4; pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fe-touch[hidden] { display: none; }
.fe-tstick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 2px solid rgba(255, 255, 255, 0.45); border-radius: 50%; background: rgba(0, 0, 0, 0.18); pointer-events: none; }
.fe-tstick[hidden] { display: none; }
.fe-tknob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); transform: translate(-50%, -50%); }
.fe-tstick.fe-tsprint { border-color: var(--fe-accent); }
.fe-tstick.fe-tsprint .fe-tknob { background: var(--fe-accent); }
.fe-tring { position: absolute; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--fe-accent) calc(var(--p, 0) * 360deg), rgba(255, 255, 255, 0.18) 0);
  -webkit-mask: radial-gradient(circle, transparent 21px, var(--fe-black) 22px); mask: radial-gradient(circle, transparent 21px, var(--fe-black) 22px); }
.fe-tring[hidden] { display: none; }
.fe-tring.fe-tmine { opacity: 0.55; }
.fe-tbtn { position: absolute; display: flex; align-items: center; justify-content: center; color: var(--fe-white); font: 600 13px var(--fe-body);
  background: rgba(0, 0, 0, 0.32); border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50%; }
.fe-tjump { right: max(22px, env(safe-area-inset-right)); bottom: 70px; width: 74px; height: 74px; }
.fe-tsneak { right: calc(max(22px, env(safe-area-inset-right)) + 92px); bottom: 34px; width: 56px; height: 56px; font-size: 12px; }
.fe-tbag, .fe-tpause { top: 76px; width: 44px; height: 44px; border-radius: 0; font-size: 12px; }
.fe-tpause { right: max(10px, env(safe-area-inset-right)); }
.fe-tbag { right: calc(max(10px, env(safe-area-inset-right)) + 54px); }
.fe-tbtn.fe-tdown, .fe-tbtn.fe-ton { background: var(--fe-accent-soft); border-color: var(--fe-accent); color: var(--fe-accent); }

/* ---- the shared world (2026-11-29): join panel, chat, compass, name tags, who is on, the admin map's view ---- */
.fe-join { width: min(560px, 100%); align-self: center; }
.fe-jbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.fe-jrow { display: flex; gap: 8px; }
.fe-jname { flex: 1; min-width: 0; }
.fe-jmsg { min-height: 16px; color: var(--fe-dim); font-size: 12px; overflow-wrap: anywhere; }
.fe-jmsg.fe-err { color: var(--fe-bad); }
.fe-jstartl { margin-top: 6px; }
.fe-jstarts { display: flex; flex-direction: column; gap: 5px; }
.fe-jstart { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--fe-text); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.14); font: 12px var(--fe-mono); text-align: left; cursor: pointer; }
.fe-jstart.fe-on { border-color: var(--fe-accent); background: rgba(255, 233, 168, 0.08); }
.fe-jsl { flex: none; }
.fe-jsd { margin-left: auto; color: var(--fe-dim); overflow-wrap: anywhere; text-align: right; min-width: 0; }
.fe-jfoot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fe-jfoot[hidden] { display: none; }
.fe-jonline { color: var(--fe-dim); font-size: 12px; margin-right: auto; }
.fe-chatlog { position: absolute; left: 12px; bottom: 76px; width: min(420px, 60vw); display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.fe-chatline { padding: 3px 7px; background: rgba(0, 0, 0, 0.45); color: var(--fe-text); font-size: 13px; overflow-wrap: anywhere; transition: opacity 0.6s; }
.fe-chatline b { color: var(--fe-accent); font-weight: 600; }
.fe-chatline.fe-chatnote { color: var(--fe-dim); font-style: italic; }
.fe-chatline.fe-gone { opacity: 0; }
.fe-p-chat { width: min(520px, 94vw); }
.fe-chatbody { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.fe-chathist { max-height: 40vh; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; }
.fe-chathist .fe-chatline { background: transparent; padding: 1px 0; }
.fe-compass { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 12px; font: 12px var(--fe-mono); }
.fe-compass[hidden] { display: none; }
.fe-carrow { display: inline-block; color: var(--fe-accent); }
.fe-tags { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.fe-tag { position: absolute; left: 0; top: 0; padding: 2px 7px; background: rgba(0, 0, 0, 0.5); color: var(--fe-white); font: 600 12px var(--fe-body); white-space: nowrap; }
.fe-tag.fe-tagfar { opacity: 0.7; font-size: 11px; }
.fe-p-players { width: min(520px, 94vw); }
.fe-plist { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.fe-plnote, .fe-plempty { color: var(--fe-dim); font-size: 12px; }
.fe-plrows { display: flex; flex-direction: column; gap: 5px; }
.fe-plrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, 0.12); }
.fe-plname { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.fe-pldist { margin-left: auto; color: var(--fe-dim); font-size: 12px; }
.fe-speclabel { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 12px; font: 12px var(--fe-mono); }
.fe-speclabel[hidden] { display: none; }
.fe-watching .fe-hotbar, .fe-watching .fe-vitals, .fe-watching .fe-cross, .fe-watching .fe-clock { display: none; }
.fe-framed .fe-speclabel { display: none; }      /* the admin map shows its own title over the view */
