/* Larp City. Colours and type follow the in-game phone UI (ReplicatedStorage.PhoneOS). */
:root {
  --bg: #0e0e11;
  --panel: #1a1a1f;
  --panel-2: #26262e;
  --line: #3a3a44;
  --text: #f0f0f0;
  --muted: #a0a2aa;
  --yellow: #fce628;
  --gold: #ffcb47;
  --red: #ff5a64;
  --blue: #5db6e5;
  --green: #72cc72;
  --font: "Montserrat", "Gotham", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
code { font-family: ui-monospace, monospace; font-size: 0.88em; background: var(--panel-2); padding: 0.1em 0.35em; border-radius: 4px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-block;
  font: 800 0.95rem/1 var(--font);
  padding: 14px 20px;
  border-radius: 8px;
  border: 0;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { text-decoration: none; background: var(--line); }
.btn-play { background: var(--yellow); color: #0f0f12; }
.btn-play:hover { background: #fff07a; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6d78f5; }

/* ---------- header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.nav-row { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.02em; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--yellow); font-weight: 900; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); font-weight: 700; font-size: 0.92rem; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--panel-2); }
.nav-row .btn { padding: 10px 16px; font-size: 0.88rem; }
@media (max-width: 640px) {
  .nav-row { gap: 12px; }
  .nav-row .btn { display: none; }
}

/* ---------- home: map hero ---------- */
.hero { position: relative; height: min(78vh, 720px); min-height: 520px; overflow: hidden; background: #3e78a8; }
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.hero-inner { position: relative; height: 100%; display: flex; align-items: flex-end; padding-bottom: 36px; }
.hero-card {
  background: rgba(14, 14, 17, 0.92);
  border-radius: 12px;
  padding: 26px 26px 24px;
  max-width: 470px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.hero-card h1 { font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 900; letter-spacing: -0.01em; margin: 6px 0 10px; }
.hero-card h1 b { color: var(--yellow); }
.hero-card p { margin: 0 0 20px; color: #d6d7dc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map-credit { position: absolute; right: 12px; bottom: 10px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.map-credit a { color: #fff; text-decoration: underline; }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title h2 { font-size: 1.7rem; font-weight: 900; }

/* careers: like the lobby's career picker */
.careers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.career {
  display: block;
  background: var(--panel);
  border-radius: 8px;
  padding: 16px 16px 18px;
  border-top: 4px solid var(--c);
  color: var(--text);
}
.career:hover { text-decoration: none; background: var(--panel-2); }
.career h3 { font-size: 1.05rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c); }
.career .tag { font-weight: 700; font-size: 0.9rem; margin: 2px 0 10px; }
.career ul { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--muted); }
.career li { padding: 2px 0; }
@media (max-width: 980px) { .careers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .careers { grid-template-columns: 1fr; } }

/* island + update */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.island-map { display: block; border-radius: 8px; overflow: hidden; background: #3e78a8; aspect-ratio: 1; }
.island-map img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.island-map:hover img { transform: scale(1.03); }
.places { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.places li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.places span:last-child { color: var(--muted); text-align: right; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.update-row { background: var(--panel); border-radius: 8px; padding: 20px 22px; }
.update-row h3 { font-size: 1.25rem; font-weight: 900; margin: 4px 0 8px; }
.update-row ul { margin: 0; padding-left: 1.1em; color: #d6d7dc; }

/* ---------- inner pages ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 900; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.page-body { padding-top: 24px; padding-bottom: 64px; }

.update { padding: 22px 0; border-bottom: 1px solid var(--line); }
.update h2 { font-size: 1.4rem; font-weight: 900; margin: 4px 0 10px; }
.tag-pill { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: var(--panel-2); color: var(--muted); margin-left: 8px; vertical-align: 1px; }
.tag-pill.major { background: var(--yellow); color: #111; }

.rules-list { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rules-list li { counter-increment: r; padding: 16px 0 16px 46px; border-bottom: 1px solid var(--line); position: relative; }
.rules-list li::before { content: counter(r); position: absolute; left: 0; top: 15px; width: 30px; height: 30px; border-radius: 6px; background: var(--panel-2); color: var(--yellow); font-weight: 900; display: grid; place-items: center; }
.rules-list strong { display: block; }
.rules-list p { margin: 2px 0 0; color: var(--muted); }
.faq-title { font-size: 1.6rem; font-weight: 900; margin: 48px 0 10px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 8px 0 0; }

/* ---------- wiki ---------- */
.wiki-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 28px; padding-bottom: 64px; }
.wiki-sidebar { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; }
.search {
  width: 100%;
  font: 600 0.92rem var(--font);
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  margin-bottom: 18px;
}
.search:focus { outline: 2px solid var(--yellow); outline-offset: -1px; }
.wiki-nav-group { margin-bottom: 18px; }
.wiki-nav-title { margin-bottom: 4px; }
.wiki-nav a { display: block; color: #cfd0d5; font-size: 0.9rem; padding: 4px 8px; margin: 0 -8px; border-radius: 6px; }
.wiki-nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.wiki-nav a.active { color: #111; background: var(--yellow); font-weight: 700; }
.wiki-nav-toggle { display: none; width: 100%; margin-bottom: 14px; }

.crumbs { margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
#wiki-main h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 900; }
.lead-summary { color: var(--muted); font-size: 1.05rem; margin: 8px 0 24px; }

.index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
.index-group { padding: 16px 0 10px; border-top: 1px solid var(--line); }
.index-group h2 { font-size: 1.05rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.index-group ul { list-style: none; margin: 0; padding: 0; }
.index-group li { padding: 5px 0; line-height: 1.35; }
.index-group a { font-weight: 700; }
.index-group span { display: block; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 700px) { .index-grid { grid-template-columns: 1fr; } }
.result { padding: 12px 0; border-bottom: 1px solid var(--line); }
.result a { font-weight: 700; }
.result p { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }

.prose { max-width: 82ch; color: #e2e3e7; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3 { font-size: 1.45rem; font-weight: 900; color: var(--text); margin: 2.2rem 0 0.8rem; }
.prose h4 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin: 1.6rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin: 0.25rem 0; }
.prose li::marker { color: var(--yellow); }
.prose strong { color: var(--text); }
.prose blockquote { margin: 0 0 1em; padding-left: 14px; border-left: 3px solid var(--yellow); }
.prose em { color: var(--muted); }
.prose a.wiki-link.missing { color: var(--red); }
.table-wrap { overflow-x: auto; margin: 0.6rem 0 1.4rem; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--panel); padding: 10px 12px; white-space: nowrap; }
td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--yellow); font-weight: 700; }
.callout { margin: 1.2rem 0; padding: 12px 16px 4px; border-radius: 8px; background: var(--panel); border-left: 4px solid var(--blue); }
.callout-title { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.callout-tip { border-left-color: var(--green); }
.callout-tip .callout-title { color: var(--green); }
.callout-warning { border-left-color: var(--red); }
.callout-warning .callout-title { color: var(--red); }
.callout p { margin: 0 0 8px; }

@media (max-width: 860px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 18px; }
  .wiki-sidebar { position: static; max-height: none; overflow: visible; }
  .wiki-nav-toggle { display: block; }
  .wiki-nav { display: none; margin-bottom: 18px; }
  .wiki-nav-open .wiki-nav { display: block; }
}

/* ---------- map page ---------- */
.map-page { flex: 1; display: flex; flex-direction: column; }
.map-view { position: relative; flex: 1; min-height: 480px; height: calc(100vh - 61px); overflow: hidden; background: #3e78a8; touch-action: none; cursor: grab; }
.map-view.dragging { cursor: grabbing; }
.map-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map-world img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.mk { position: absolute; transform: translate(-50%, -50%) scale(var(--inv, 1)); white-space: nowrap; pointer-events: none; }
.mk-district { font-weight: 900; font-size: 15px; letter-spacing: 0.14em; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.45); }
.mk-street { font-weight: 700; font-size: 11px; color: #2b2b2e; text-shadow: 0 0 3px #f4f2ea, 0 0 3px #f4f2ea; transform: translate(-50%, -50%) scale(var(--inv, 1)) rotate(var(--a)); display: none; }
.show-streets.zoom-2 .mk-street.major, .show-streets.zoom-3 .mk-street { display: block; }
.mk-pin { pointer-events: auto; cursor: pointer; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #111; background: var(--yellow); padding: 0; }
.mk-pin.landmark { background: #fff; }
.mk-pin:hover, .mk-pin.on { box-shadow: 0 0 0 4px rgba(252, 230, 40, 0.5); }
.mk-name { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px #000; transform: translate(10px, -50%) scale(var(--inv, 1)); transform-origin: 0 50%; display: none; }
.zoom-2 .mk-name { display: block; }
.hide-props .property, .hide-land .landmark { display: none !important; }

.map-ui { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.map-panel { background: rgba(14, 14, 17, 0.94); border-radius: 10px; padding: 12px 14px; width: 230px; }
.map-panel h1 { font-size: 1.1rem; font-weight: 900; }
.map-panel p { margin: 4px 0 8px; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.map-panel label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; padding: 3px 0; cursor: pointer; }
.map-panel input { accent-color: var(--yellow); }
.zoom-btns { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.zoom-btns button { width: 40px; height: 40px; border-radius: 8px; border: 0; background: rgba(14, 14, 17, 0.94); color: var(--text); font: 800 1.2rem var(--font); cursor: pointer; }
.zoom-btns button:hover { background: var(--panel-2); }
.place-card { position: absolute; left: 12px; bottom: 12px; z-index: 6; width: min(340px, calc(100% - 24px)); background: rgba(14, 14, 17, 0.96); border-radius: 10px; padding: 14px 16px; display: none; }
.place-card.open { display: block; }
.place-card h2 { font-size: 1.1rem; font-weight: 900; margin: 2px 0 4px; }
.place-card .price { color: var(--yellow); font-weight: 800; }
.place-card p { margin: 6px 0 0; font-size: 0.88rem; color: #d6d7dc; }
.place-card .x { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
@media (max-width: 640px) {
  .map-panel { width: auto; max-width: calc(100vw - 80px); }
  .map-panel p { display: none; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: 0.85rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.footer-links a:hover { color: var(--text); }
.map-body .site-footer { display: none; }
