:root {
  color-scheme: dark;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: "Cormorant Garamond", serif;
}

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* ---------- Title Screen ---------- */

#title-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  background: radial-gradient(ellipse at 50% 40%, #0c0c0d 0%, #000 70%);
}

.game-title {
  font-family: "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 11vw, 8rem);
  letter-spacing: 0.12em;
  text-align: center;
  line-height: 1;
  position: relative;
  background: linear-gradient(
    100deg,
    #4a4d52 0%,
    #cfd3d8 18%,
    #f4f6f9 30%,
    #8b8f96 42%,
    #e8ebef 55%,
    #6a6e74 68%,
    #d6dade 80%,
    #45484d 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(220, 225, 235, 0.55))
    drop-shadow(0 0 22px rgba(180, 190, 205, 0.35))
    drop-shadow(0 0 46px rgba(140, 150, 165, 0.25));
  animation: shimmer 6s linear infinite;
  user-select: none;
}

.game-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(200, 208, 220, 0.15);
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

.subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #8b8f96;
  text-shadow: 0 0 10px rgba(160, 170, 185, 0.3);
  margin-top: -0.6rem;
}

#start-btn {
  margin-top: 1.2rem;
  padding: 0.85em 2.6em;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: #e6e9ee;
  background: linear-gradient(180deg, #2a2c30 0%, #16171a 100%);
  border: 1px solid #6a6e76;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 0 18px rgba(180, 190, 205, 0.12);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

#start-btn:hover {
  border-color: #cfd3d8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 0 30px rgba(210, 220, 235, 0.35);
  transform: translateY(-1px);
}

#start-btn:active {
  transform: translateY(0);
}

#name-input {
  margin-top: 0.4rem;
  padding: 0.6em 1em;
  width: min(280px, 70vw);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
  color: #e6e9ee;
  background: rgba(20, 21, 24, 0.6);
  border: 1px solid rgba(200, 205, 213, 0.3);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

#name-input::placeholder {
  color: #5c5f66;
}

#name-input:focus {
  border-color: #cfd3d8;
}

.hint {
  color: #5c5f66;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

#lightning-flash {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

#version-footer {
  position: fixed;
  left: 0.6rem;
  bottom: 0.5rem;
  z-index: 30;
  color: #5b8fd6;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  pointer-events: none;
  user-select: none;
}

/* ---------- Auth (Log In / Create Account / Guest / Forgot) ---------- */

#auth-tabs {
  display: flex;
  gap: 0.4rem;
}

.auth-tab {
  padding: 0.5em 1.2em;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d818a;
  background: transparent;
  border: 1px solid rgba(200, 205, 213, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.auth-tab:hover {
  color: #cfd3d8;
  border-color: rgba(200, 205, 213, 0.4);
}

.auth-tab.active {
  color: #e6e9ee;
  border-color: #6a6e76;
  background: rgba(255, 255, 255, 0.04);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.auth-panel input,
.auth-panel select {
  margin-top: 0;
  padding: 0.6em 1em;
  width: min(280px, 70vw);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
  color: #e6e9ee;
  background: rgba(20, 21, 24, 0.6);
  border: 1px solid rgba(200, 205, 213, 0.3);
  border-radius: 2px;
  outline: none;
}

.auth-panel input::placeholder {
  color: #5c5f66;
}

.auth-panel input:focus {
  border-color: #cfd3d8;
}

.auth-panel button {
  margin-top: 0.4rem;
  padding: 0.75em 2.4em;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.14em;
  color: #e6e9ee;
  background: linear-gradient(180deg, #2a2c30 0%, #16171a 100%);
  border: 1px solid #6a6e76;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
}

.auth-panel button:hover {
  border-color: #cfd3d8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 0 30px rgba(210, 220, 235, 0.35);
  transform: translateY(-1px);
}

.auth-panel button:active {
  transform: translateY(0);
}

.auth-error {
  color: #d97b7b;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: min(320px, 75vw);
}

.auth-note {
  color: #7d818a;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: min(320px, 75vw);
}

.auth-link {
  margin-top: -0.2rem;
}

.auth-link a {
  color: #7d818a;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-decoration: underline;
  cursor: pointer;
}

.auth-link a:hover {
  color: #cfd3d8;
}

.skin-tone-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: -0.2rem;
}

.skin-tone-label {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d818a;
}

.skin-swatches {
  display: flex;
  gap: 0.5rem;
}

.skin-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid rgba(200, 205, 213, 0.25);
}

.skin-swatch:hover {
  border-color: rgba(200, 205, 213, 0.6);
}

.skin-swatch.selected {
  border-color: #e6e9ee;
  box-shadow: 0 0 8px rgba(230, 233, 238, 0.5);
}

/* ---------- Loading Screen ---------- */

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #000;
}

.loading-label {
  font-family: "Cinzel", serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 1rem;
  color: #9ba0a8;
}

.progress-track {
  width: min(360px, 70vw);
  height: 3px;
  background: #1c1d20;
  border: 1px solid #34363a;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a6e76, #eef1f5);
  box-shadow: 0 0 10px rgba(220, 225, 235, 0.6);
  transition: width 0.15s ease-out;
}

/* ---------- HUD ---------- */

#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(230, 233, 238, 0.85);
  box-shadow: 0 0 6px rgba(230, 233, 238, 0.8);
  transform: translate(-50%, -50%);
}

/* Circular gather meter — fills over the 5s channel started by E. */
#gather-meter {
  position: absolute;
  top: 50%;
  left: calc(50% + 46px);
  transform: translateY(-50%);
}

/* A vertical bar that drains top-to-bottom while E is held — the fill
   stays anchored to the bottom (align-items: flex-end) and shrinks, so
   the "used up" portion disappears from the top first, like an hourglass
   rather than a bottom-up loading bar. */
.gather-meter-track {
  width: 14px;
  height: 90px;
  background: rgba(200, 205, 213, 0.15);
  border: 1px solid rgba(200, 205, 213, 0.25);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.gather-meter-fill {
  width: 100%;
  height: 100%;
  background: #6ec97f;
  transition: height 0.08s linear;
}

/* ---------- Stats panel ---------- */

#stats-panel {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  background: rgba(8, 8, 10, 0.55);
  border: 1px solid rgba(200, 205, 213, 0.18);
  border-radius: 3px;
  backdrop-filter: blur(2px);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.stat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #aeb4bd;
}

.stat-bar-track {
  width: 140px;
  height: 10px;
  background: #1c1d20;
  border: 1px solid #34363a;
  border-radius: 2px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #7a1f1f, #d84545);
  box-shadow: 0 0 8px rgba(216, 69, 69, 0.6);
  transition: width 0.3s ease;
}

.stat-label {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ba0a8;
  width: 140px;
}

.stat-value {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  color: #dfe2e7;
  letter-spacing: 0.04em;
  min-width: 2.5em;
  text-align: right;
}

/* ---------- Skills / Inventory menus (text-based, toggled by 0 / I) ---------- */

#skills-menu,
#inventory-menu,
#manual-menu,
#character-menu,
#station-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: min(480px, 88vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.6rem;
  background: rgba(8, 8, 10, 0.92);
  border: 1px solid rgba(200, 205, 213, 0.25);
  border-radius: 3px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* The Editor panel is a plain, simple "Windows GUI" utility window —
   deliberately NOT this game's dark fantasy Cinzel styling every other
   menu uses, so it reads as a distinct tool rather than in-world UI.
   Opaque light-grey body, beveled outset/inset borders (the classic
   Windows 95 trick: border-style:outset/inset auto-shades from
   border-color, no gradients needed), a title bar with a real close
   button. Docked to the top and capped short so it stays out of the way
   of the world underneath rather than block the view; its groups flow
   left-to-right, wrapping only if the viewport is too narrow, instead of
   stacking into a tall vertical list. */
#admin-menu {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  z-index: 25;
  max-height: 11rem;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  color: #101010;
}

#admin-menu-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.4rem;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

#admin-menu-close {
  width: 1.1rem;
  height: 1.1rem;
  line-height: 1;
  padding: 0;
  font-family: Tahoma, sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  color: #101010;
  background: #c0c0c0;
  border: 1px outset #dfdfdf;
  cursor: pointer;
}

#admin-menu-close:active {
  border-style: inset;
}

#admin-menu-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
  overflow-y: auto;
  padding: 0.4rem;
}

.editor-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.35rem;
  background: #c0c0c0;
  border: 1px inset #dfdfdf;
  white-space: nowrap;
}

.editor-group-wide {
  flex: 1 1 100%;
  white-space: normal;
}

.editor-group-label {
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-size: 0.68rem;
  color: #101010;
  margin-right: 0.1rem;
}

.editor-group input,
.editor-group select {
  padding: 0.2em 0.4em;
  width: auto;
  max-width: 8rem;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-size: 0.75rem;
  color: #101010;
  background: #fff;
  border: 1px inset #808080;
  border-radius: 0;
  outline: none;
}

.editor-group input[type="text"] {
  width: 8rem;
}

.editor-group input::placeholder {
  color: #808080;
}

.editor-group button {
  padding: 0.25em 0.6em;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-weight: normal;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: #101010;
  background: #c0c0c0;
  border: 1px outset #dfdfdf;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}

.editor-group button:hover {
  background: #cfcfcf;
}

.editor-group button:active {
  border-style: inset;
}

.editor-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-size: 0.72rem;
  color: #101010;
  cursor: pointer;
  user-select: none;
}

.editor-checkbox-label input[type="checkbox"] {
  width: auto;
  max-width: none;
  margin: 0;
  cursor: pointer;
}

#admin-inhabitants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  max-height: 3.4rem;
  overflow-y: auto;
  width: 100%;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
}

#admin-inhabitants-list .wardrobe-item {
  padding: 0;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #101010;
}

#admin-inhabitants-list .wardrobe-item-action {
  color: #00008b;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  text-decoration: underline;
}

#admin-inhabitants-list .wardrobe-item-action:hover {
  color: #1084d0;
}

#skills-menu h2,
#inventory-menu h2,
#manual-menu h2,
#character-menu h2,
#station-menu h2 {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e6e9ee;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 10px rgba(200, 205, 213, 0.3);
}

#skills-menu-overall {
  font-size: 0.75rem;
  color: #8b8f96;
  text-shadow: none;
}

#skills-menu-content,
#inventory-menu-content,
#manual-menu-content,
#character-menu-content,
#station-menu-content {
  overflow-y: auto;
  padding-right: 0.4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
}

.skill-category {
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b8f96;
  margin: 0.9rem 0 0.3rem;
  border-bottom: 1px solid rgba(200, 205, 213, 0.15);
  padding-bottom: 0.2rem;
}

.skill-category:first-child {
  margin-top: 0;
}

.skill-line {
  display: flex;
  justify-content: space-between;
  padding: 0.15rem 0;
  color: #c9ced4;
}

.skill-line.active {
  color: #e6e9ee;
}

.skill-line .lv {
  color: #9ba0a8;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
}

.skill-line.active .lv {
  color: #6ec97f;
}

.inventory-line {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  color: #dfe2e7;
}

.menu-empty {
  color: #6a6e76;
  font-style: italic;
}

.menu-hint {
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(200, 205, 213, 0.15);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #6a6e76;
  text-align: center;
}

/* ---------- Character / wardrobe (paper doll, toggled by P) ---------- */

.doll-figure {
  display: flex;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.doll-figure svg {
  width: 70px;
  height: 130px;
  stroke: #9ba0a8;
  stroke-width: 2;
  fill: rgba(155, 160, 168, 0.12);
}

.doll-slot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(200, 205, 213, 0.18);
  border-radius: 3px;
  cursor: pointer;
  color: #c9ced4;
}

.doll-slot:hover {
  border-color: rgba(200, 205, 213, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.doll-slot-icon {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(200, 205, 213, 0.25);
}

.doll-slot-icon.placeholder {
  background: rgba(255, 255, 255, 0.05);
}

.doll-slot-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.doll-slot-label {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b8f96;
}

.doll-slot-value {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #e6e9ee;
}

.doll-totals {
  margin: 0.6rem 0 1rem;
}

.wardrobe-heading {
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b8f96;
  margin: 0.9rem 0 0.3rem;
  border-bottom: 1px solid rgba(200, 205, 213, 0.15);
  padding-bottom: 0.2rem;
}

.wardrobe-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  color: #c9ced4;
}

.wardrobe-item.equipped {
  color: #6ec97f;
}

.wardrobe-item .doll-slot-icon {
  width: 22px;
  height: 22px;
}

.wardrobe-item-name {
  flex: 1;
}

.wardrobe-item-action {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #9ba0a8;
  cursor: pointer;
  white-space: nowrap;
}

.wardrobe-item-action:hover {
  color: #e6e9ee;
}

/* ---------- Inventory grid (I menu) — square slots, click/right-click for
   a details+action popover instead of an inline text list ---------- */

.inv-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.inv-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(200, 205, 213, 0.22);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  overflow: hidden;
}

.inv-slot:hover {
  border-color: rgba(200, 205, 213, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

.inv-slot.equipped {
  border-color: #6ec97f;
  box-shadow: 0 0 6px rgba(110, 201, 127, 0.45);
}

.inv-slot-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inv-slot-glyph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.inv-slot-count {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  color: #f2f4f6;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000;
}

#inv-context-menu {
  position: fixed;
  z-index: 60;
  min-width: 190px;
  max-width: 240px;
  background: rgba(8, 8, 10, 0.96);
  border: 1px solid rgba(200, 205, 213, 0.3);
  border-radius: 3px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
  padding: 0.6rem 0.7rem;
}

#inv-context-title {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #e6e9ee;
  margin-bottom: 0.25rem;
}

#inv-context-desc {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.88rem;
  line-height: 1.3;
  color: #9ba0a8;
  margin-bottom: 0.5rem;
}

.inv-context-action {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.3rem 0;
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #c9ced4;
  cursor: pointer;
}

.inv-context-action:hover {
  color: #6ec97f;
}

.inv-context-action.close {
  color: #6a6e76;
  border-top: 1px solid rgba(200, 205, 213, 0.15);
  margin-top: 0.2rem;
  padding-top: 0.4rem;
}

.inv-context-action.close:hover {
  color: #c9ced4;
}

/* ---------- Interaction prompt / craft toast ---------- */

#interact-prompt {
  position: absolute;
  bottom: 8rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  background: rgba(8, 8, 10, 0.7);
  border: 1px solid rgba(200, 205, 213, 0.3);
  border-radius: 3px;
  color: #e6e9ee;
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

#craft-toast {
  position: absolute;
  bottom: 8rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  background: rgba(8, 8, 10, 0.7);
  border: 1px solid rgba(79, 174, 99, 0.4);
  border-radius: 3px;
  color: #cdeed5;
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

#craft-toast.failed {
  border-color: rgba(216, 69, 69, 0.4);
  color: #f0d4d4;
}

/* Editor crosshair — shown only in Fly Mode, marks the point a left-click
   raycasts from to select a world prop (see pickAdminPropAtCrosshair()). */
#editor-cursor {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 12;
}

#editor-cursor span {
  position: absolute;
  background: rgba(63, 169, 255, 0.9);
  box-shadow: 0 0 4px rgba(63, 169, 255, 0.8);
}

#editor-cursor span:first-child {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

#editor-cursor span:last-child {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

#action-dock {
  position: absolute;
  bottom: 1.8rem;
  right: 1.6rem;
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.8rem;
  background: rgba(8, 8, 10, 0.75);
  border: 1px solid rgba(200, 205, 213, 0.3);
  border-radius: 3px;
  color: #c9ced4;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.dock-btn:hover {
  border-color: #cfd3d8;
  color: #e6e9ee;
  background: rgba(20, 21, 24, 0.85);
}

.dock-key {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #9ba0a8;
}

.dock-btn:hover .dock-key {
  color: #e6e9ee;
}

#controls-hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(200, 205, 213, 0.7);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  transition: opacity 1s ease 2.5s;
}

#controls-hint.faded {
  opacity: 0;
}

/* ---------- Pause overlay ---------- */

#pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #e6e9ee;
  font-family: "Cinzel", serif;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ---------- Dueling ---------- */

#duel-status {
  position: absolute;
  bottom: 4.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: #e0a3a3;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.85);
}

#duel-prompt {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  padding: 1rem 1.6rem;
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(216, 69, 69, 0.5);
  border-radius: 3px;
  text-align: center;
  color: #e6e9ee;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
}

#duel-prompt .duel-keys {
  margin-top: 0.4rem;
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #9ba0a8;
}

#duel-result {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  padding: 0.8rem 1.6rem;
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(200, 205, 213, 0.35);
  border-radius: 3px;
  color: #e6e9ee;
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-align: center;
}

#server-announcement {
  position: fixed;
  top: 14%;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 30;
  padding: 0.7rem 1.8rem;
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid rgba(230, 201, 100, 0.5);
  border-radius: 3px;
  color: #f0e2b8;
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-align: center;
}

/* ---------- Disconnect notice ---------- */

#disconnect-notice {
  position: fixed;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 0.6rem 1.2rem;
  background: rgba(40, 10, 10, 0.85);
  border: 1px solid rgba(216, 69, 69, 0.5);
  border-radius: 3px;
  color: #f0d4d4;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

[hidden] {
  display: none !important;
}
