/* The online world: the shared map, the hub between offices, and MyNet (the in-game internet). */

.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(54, 196, 143, 0.6); animation: live 1.8s infinite; display: inline-block; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(54, 196, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(54, 196, 143, 0); } }
.chip.online { color: var(--good); border-color: rgba(54, 196, 143, 0.4); background: rgba(54, 196, 143, 0.1); }

#world { position: relative; }
#world::before {
  content: '';
  position: absolute;
  inset: 40px 0 auto 0;
  height: 700px;
  z-index: -1;
  background: radial-gradient(ellipse 60% 50% at 50% 20%, rgba(90, 168, 255, 0.12), transparent 70%), radial-gradient(ellipse 40% 40% at 80% 60%, rgba(155, 123, 255, 0.1), transparent 70%);
  pointer-events: none;
}

/* ------------------------------------------------------------- the world map */
.worldwrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: stretch; }
.worldmap {
  position: relative;
  padding: 14px;
  background: #1b2a1d;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.worldmap .map-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 0 2px; }
.worldmap .map-head svg { height: 16px; width: auto; }
.worldmap .map-head .chip { font-size: 12px; }
.districts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 18px;
  padding: 10px;
  background:
    linear-gradient(#3b3a44, #3b3a44) 0 calc(33.33% - 2px) / 100% 14px no-repeat,
    linear-gradient(#3b3a44, #3b3a44) 0 calc(66.66% + 2px) / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, #ffc94a 0 12px, transparent 12px 24px) 0 calc(33.33% + 4px) / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, #ffc94a 0 12px, transparent 12px 24px) 0 calc(66.66% + 8px) / 100% 2px no-repeat,
    #5c9f45;
  border-radius: 12px;
}
.district {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.district .land {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-image: url(/shots/city-wide.webp);
  background-size: 420%;
  image-rendering: pixelated;
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  filter: hue-rotate(var(--hue, 0deg)) saturate(1.05);
  transition: filter 0.3s;
}
.district.off .land { filter: hue-rotate(var(--hue, 0deg)) grayscale(0.7) brightness(0.6); }
.district:hover { transform: translateY(-4px) scale(1.04); z-index: 4; }
.district.me .land { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 201, 74, 0.35), 0 4px 0 rgba(0, 0, 0, 0.3); }
.district .name {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  max-width: 120%;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(21, 18, 28, 0.92);
  border: 1px solid var(--line-2);
  z-index: 3;
}
.district .name small { color: var(--muted); font-weight: 500; }
.district.off .online-dot { background: var(--dim); animation: none; }
.district.me .name { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.district.me .name small { color: #5b4612; }
.district.lot .land { background: repeating-linear-gradient(45deg, #6f8f4f 0 10px, #67864a 10px 20px); filter: none; border-style: dashed; border-color: rgba(255, 255, 255, 0.35); }
.district.lot .crane { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; animation: hammer 1.2s ease-in-out infinite; }
@keyframes hammer { 50% { transform: rotate(-12deg) translateY(-3px); } }
.district .badge {
  position: absolute;
  top: -12px;
  inset-inline-end: -8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 6;
  animation: badge 3.2s cubic-bezier(0.3, 1.6, 0.5, 1) forwards;
  pointer-events: none;
}
@keyframes badge { 0% { transform: scale(0); } 10% { transform: scale(1.15); } 15% { transform: scale(1); } 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.8) translateY(-8px); } }
.traveler {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 48px;
  margin: -44px 0 0 -20px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-size: 160px 48px;
  z-index: 8;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}
.traveler .vt {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(21, 18, 28, 0.9);
  border: 1px dashed var(--accent, var(--line-2));
}
.visit-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 7; overflow: visible; }
.visit-path path { fill: none; stroke: #fffdf8; stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; opacity: 0.9; animation: march 0.8s linear infinite; }
@keyframes march { to { stroke-dashoffset: -18; } }

.worldside { display: flex; flex-direction: column; gap: 12px; }
.worldside .card { padding: 16px; }
.worldside h4 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.visits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 230px; }
.visits li { display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); animation: slide-in 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.visits li img { width: 30px; height: 36px; object-fit: cover; object-position: top; image-rendering: pixelated; flex: none; }
.visits li small { display: block; color: var(--muted); font-size: 11.5px; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-14px) scale(0.95); } }
.legend-map { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.legend-map span { display: flex; align-items: center; gap: 8px; }
.legend-map i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------- the hub between offices */
.hubflow { display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: center; gap: 0; margin: 26px 0 8px; position: relative; }
.node { padding: 18px; text-align: center; position: relative; z-index: 2; }
.node .big { font-size: 34px; display: block; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; }
.node b { display: block; font-size: 16px; }
.node small { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.node.hub { border-color: rgba(90, 168, 255, 0.45); background: linear-gradient(180deg, rgba(90, 168, 255, 0.12), var(--panel)); }
.node.hub .big { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.node .locks { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; }
.node .locks span { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.wire { position: absolute; top: 50%; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 8px, transparent 8px 14px); z-index: 1; }
.wire.a { right: 26%; left: 62%; }
.wire.b { right: 62%; left: 26%; }
.packet { position: absolute; top: -12px; font-size: 16px; animation: travel var(--t, 3s) linear infinite; animation-delay: var(--d, 0s); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4)); }
.packet.back { animation-name: travel-back; }
@keyframes travel { from { right: -6%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { right: 100%; opacity: 0; } }
@keyframes travel-back { from { right: 100%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { right: -6%; opacity: 0; } }

.world-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.world-cards .card { padding: 18px; }
.world-cards .ic { font-size: 26px; display: inline-block; margin-bottom: 6px; }
.world-cards .card:hover .ic { animation: wiggle 0.5s; }
.world-cards h3 { font-size: 16px; margin: 0 0 4px; }
.world-cards p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------- MyNet: a browser inside the game */
.mynet-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 70px 0 18px; flex-wrap: wrap; }
.mynet-head h3 { font-size: 28px; margin: 0; }
.mynet-head p { margin: 4px 0 0; color: var(--muted); max-width: 40em; }
.browser { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.b-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.b-top .dots { display: flex; gap: 6px; }
.b-top .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.b-top .dots i:nth-child(2) { background: var(--yellow); }
.b-top .dots i:nth-child(3) { background: var(--good); }
.b-url { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); font: 13px var(--mono); color: var(--muted); direction: ltr; text-align: left; overflow: hidden; white-space: nowrap; }
.b-url b { color: var(--text); font-weight: 500; }
.b-url .lock { color: var(--good); }
.b-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: var(--panel-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.b-tabs button {
  border: 1px solid transparent;
  border-bottom: 0;
  background: none;
  color: var(--muted);
  font: 600 14px var(--font);
  padding: 9px 16px 10px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.b-tabs button.on { background: var(--panel); color: var(--text); border-color: var(--line); }
.b-tabs button.on::after { content: ''; position: absolute; inset: auto 12px 0 12px; height: 2px; background: var(--yellow); border-radius: 2px; }
.b-tabs .prog { position: absolute; inset: auto 0 0 0; height: 2px; background: var(--blue); transform-origin: right; transform: scaleX(0); }
.b-tabs button.on .prog { animation: tabprog var(--tab-t, 9s) linear forwards; }
.b-tabs.manual .prog { display: none; }
@keyframes tabprog { to { transform: scaleX(1); } }
.b-body { height: 560px; position: relative; overflow: hidden; }
.pane { position: absolute; inset: 0; padding: 18px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.35s, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1), visibility 0.35s; }
.pane.on { opacity: 1; visibility: visible; transform: none; }

/* Chirp */
.chirp { display: grid; grid-template-columns: 1fr 260px; gap: 16px; height: 100%; }
.composer { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.composer .ph { flex: 1; color: var(--text); font-size: 14px; min-height: 22px; }
.composer .ph:empty::before { content: attr(data-ph); color: var(--dim); }
.composer .post-btn { padding: 6px 14px; border-radius: 9px; background: var(--blue); color: #08203a; font-weight: 700; font-size: 13px; transition: transform 0.1s; }
.composer .post-btn.press { transform: scale(0.9); }
.av { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-3) no-repeat center 2px / 30px auto; image-rendering: pixelated; flex: none; border: 1px solid var(--line); }
.feed-col { display: flex; flex-direction: column; min-height: 0; }
.chirp-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.chirp-tabs span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.chirp-tabs span.on { background: var(--text); color: var(--ink); }
.posts { display: flex; flex-direction: column; gap: 10px; overflow: hidden; flex: 1; mask-image: linear-gradient(180deg, #000 80%, transparent); }
.post { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); animation: post-in 0.55s cubic-bezier(0.3, 1.4, 0.5, 1); }
.post.mine { border-color: rgba(255, 201, 74, 0.45); }
@keyframes post-in { from { opacity: 0; transform: translateY(-24px) scale(0.96); max-height: 0; } to { max-height: 200px; } }
.post .pb { flex: 1; min-width: 0; }
.post .who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.post .who b { font-size: 14px; }
.post .who small { color: var(--dim); }
.tagb { font-size: 10.5px; font-weight: 600; padding: 0 7px; border-radius: 999px; border: 1px solid; }
.tagb.team { color: var(--yellow); border-color: rgba(255, 201, 74, 0.4); }
.tagb.other { color: var(--teal); border-color: rgba(74, 217, 200, 0.4); border-style: dashed; }
.tagb.paper { color: var(--blue); border-color: rgba(90, 168, 255, 0.4); }
.tagb.town { color: var(--muted); border-color: var(--line-2); }
.tagb.you { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.post p { margin: 4px 0 6px; font-size: 14px; line-height: 1.6; color: #e6def0; }
.post p .hash { color: var(--blue); }
.post .acts { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.post .acts button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; display: flex; gap: 5px; align-items: center; padding: 0; position: relative; }
.post .acts .like.on { color: var(--pink); }
.post .acts .like .h { display: inline-block; transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.post .acts .like.bump .h { transform: scale(1.5); }
.post .acts .n { font-family: var(--mono); font-size: 12px; }
.post .reply { margin-top: 8px; padding: 7px 10px; border-radius: 9px; background: var(--panel-2); font-size: 13px; color: var(--muted); animation: slide-in 0.4s ease-out; }
.post .reply b { color: var(--text); }
.side-col { display: flex; flex-direction: column; gap: 12px; }
.side-col .box { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.side-col h5 { margin: 0 0 8px; font-size: 14px; }
.trend { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.trend:last-child { border-bottom: 0; }
.trend b { color: var(--blue); font-weight: 600; direction: ltr; }
.trend small { color: var(--dim); font-size: 11.5px; transition: color 0.3s; }
.trend small.up { color: var(--good); }
.suggest { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.suggest .av { width: 30px; height: 30px; background-size: 24px auto; }
.suggest span { flex: 1; line-height: 1.35; }
.suggest span small { display: block; color: var(--dim); font-size: 11px; }
.follow { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--text); color: var(--ink); font: 700 12px var(--font); cursor: pointer; transition: all 0.2s; }
.follow.on { background: transparent; color: var(--muted); }

/* The Daily Byte */
.paper { height: 100%; background: #f4efe2; color: #1d1726; border-radius: 12px; padding: 18px 22px; overflow: hidden; position: relative; }
.paper .mast { text-align: center; border-bottom: 3px double #1d1726; padding-bottom: 8px; margin-bottom: 10px; }
.paper .mast svg { height: 22px; width: auto; }
.paper .mast small { display: block; font-size: 12px; color: #6b6275; margin-top: 4px; }
.paper .secs { display: flex; justify-content: center; gap: 14px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid #c9bfa8; padding-bottom: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.paper .secs span.on { text-decoration: underline 2px; text-underline-offset: 4px; }
.paper .cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.paper .lead h4 { font-size: 24px; line-height: 1.3; margin: 0 0 8px; min-height: 62px; }
.paper .lead h4::after { content: '▌'; color: #c25fa8; animation: blink 0.9s steps(2) infinite; }
.paper .lead.done h4::after { content: none; }
.paper .lead img { width: 100%; height: 190px; object-fit: cover; image-rendering: pixelated; border: 2px solid #1d1726; margin-bottom: 8px; filter: sepia(0.25); }
.paper .lead p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.7; color: #3a3346; }
.paper blockquote { margin: 0; padding: 6px 12px; border-inline-start: 3px solid #c25fa8; font-size: 13.5px; font-weight: 600; }
.paper .small-story { border-bottom: 1px solid #c9bfa8; padding: 0 0 10px; margin-bottom: 10px; }
.paper .small-story b { display: block; font-size: 15px; line-height: 1.4; }
.paper .small-story span { font-size: 12.5px; color: #5b5266; line-height: 1.6; display: block; margin-top: 3px; }
.paper .kicker { font-size: 11px; font-weight: 700; color: #c25fa8; letter-spacing: 0.02em; }
.press { position: absolute; inset: 0; background: #f4efe2; display: grid; place-items: center; z-index: 5; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.press.on { opacity: 1; }
.press div { text-align: center; font-weight: 700; color: #6b6275; }
.press .roll { width: 70px; height: 70px; margin: 0 auto 10px; border-radius: 50%; border: 6px dashed #1d1726; animation: spin 0.8s linear infinite; }

/* People */
.people-filter { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.people-filter span { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.people-filter span.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.person { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; animation: card-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.person .pic { width: 60px; height: 72px; margin: 0 auto 6px; image-rendering: pixelated; background-repeat: no-repeat; background-size: 60px 72px; }
.person b { display: block; font-size: 14px; }
.person small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; min-height: 34px; }
.person .fc { font: 12px var(--font); color: var(--dim); margin: 6px 0 8px; }

/* Search */
.searchbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); margin-bottom: 16px; font-size: 15px; }
.searchbar .q { flex: 1; direction: ltr; text-align: right; }
.searchbar .q::after { content: ''; display: inline-block; width: 2px; height: 16px; background: var(--yellow); margin-inline-start: 2px; vertical-align: middle; animation: blink 1s steps(2) infinite; }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rgroup { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.rgroup.in { opacity: 1; transform: none; }
.rgroup h5 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.ritem { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.ritem .av { width: 30px; height: 30px; background-size: 24px auto; }
.ritem small { color: var(--dim); display: block; font-size: 11.5px; }
.ritem .go { margin-inline-start: auto; font-size: 11.5px; color: var(--blue); white-space: nowrap; }

@media (max-width: 1100px) {
  .worldwrap { grid-template-columns: 1fr; }
  .visits { min-height: 0; }
  .world-cards { grid-template-columns: repeat(2, 1fr); }
  .chirp { grid-template-columns: 1fr; }
  .side-col { display: none; }
  .people { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .districts { grid-template-columns: repeat(3, 1fr); gap: 20px 12px; background: #5c9f45; }
  .hubflow { grid-template-columns: 1fr; gap: 30px; }
  .wire { display: none; }
  .paper .cols { grid-template-columns: 1fr; }
  .paper .side-stories { display: none; }
  .results { grid-template-columns: 1fr; }
  .b-body { height: 600px; }
}
@media (max-width: 560px) {
  .districts { grid-template-columns: repeat(2, 1fr); }
  .district .name { font-size: 10px; }
  .district .name small { display: none; }
  .world-cards { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .paper { padding: 14px; }
  .paper .lead h4 { font-size: 19px; }
  .pane { padding: 12px; }
}
