/* —— Unified World Editor — world identity + mode hub —— */

:root {
  --we-chrome-height: 88px;
  --we-accent: #c9a227;
  --we-ink: #0c0e14;
  --we-panel: rgba(14, 16, 22, 0.92);
  --we-border: rgba(255, 255, 255, 0.1);
  --we-text: #e9e5da;
  --we-muted: rgba(233, 229, 218, 0.62);
}

body.we-has-chrome {
  padding-top: var(--we-chrome-height);
}

.we-world-chrome {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px 20px;
  min-height: var(--we-chrome-height);
  padding: 10px 16px;
  border-bottom: 1px solid var(--we-border);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.98), rgba(10, 12, 18, 0.94));
  backdrop-filter: blur(12px);
  color: var(--we-text);
  font-family: var(--font-ui, system-ui, sans-serif);
  box-sizing: border-box;
}

.we-world-chrome__eyebrow {
  margin: 0 0 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--we-muted);
}

.we-world-chrome__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.we-world-chrome__title {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.we-world-chrome__id {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.12);
  color: #f0d878;
  font-size: 11px;
}

.we-world-chrome__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--we-muted);
}

.we-world-chrome__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.we-world-chrome__mode {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--we-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--we-text);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.we-world-chrome__mode:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.we-world-chrome__mode.is-active {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.18);
  color: #fff;
}

.we-world-chrome__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.we-world-chrome__link {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--we-border);
  color: var(--we-text);
  font-size: 12px;
  text-decoration: none;
}

.we-world-chrome__link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.we-legacy-banner {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(220, 160, 80, 0.35);
  background: rgba(120, 72, 16, 0.28);
  color: #f6e2b8;
  font-size: 13px;
}

.we-legacy-banner a {
  color: #ffd878;
}

.we-hub {
  min-height: 100dvh;
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.12), transparent 60%),
    var(--we-ink);
  color: var(--we-text);
  font-family: var(--font-ui, system-ui, sans-serif);
  box-sizing: border-box;
}

.we-hub__header {
  max-width: 960px;
  margin: 0 auto 28px;
}

.we-hub__title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: 0.03em;
}

.we-hub__lead {
  margin: 0;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--we-muted);
}

.we-hub__world-grid,
.we-hub__mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}

.we-hub__section-title {
  max-width: 960px;
  margin: 28px auto 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--we-muted);
}

.we-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--we-border);
  background: var(--we-panel);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.we-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.we-card__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 162, 39, 0.85);
}

.we-card__title {
  margin: 0;
  font-size: 18px;
}

.we-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--we-muted);
}

.we-card__meta {
  margin-top: auto;
  font-size: 11px;
  color: rgba(233, 229, 218, 0.48);
  font-variant-numeric: tabular-nums;
}

.we-empty {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--we-border);
  color: var(--we-muted);
  text-align: center;
}

@media (max-width: 900px) {
  :root {
    --we-chrome-height: 128px;
  }

  .we-world-chrome {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .we-world-chrome__modes {
    justify-content: flex-start;
  }
}
