/* CRECE WORLD · immersive miniature diorama. Controls remain semantic HTML. */
:root {
  --ink: #344e50;
  --muted: #738c8d;
  --paper: #fffdf7;
  --line: #d9e4e3;
  --sky: #c4dce9;
  --sky-bottom: #d9e8ed;
  background: #e3edf0;
}
body {
  background: #e3edf0;
}
.topbar {
  height: 66px;
  background: #f8fbf9ed;
  border-bottom: 1px solid #fff9;
  padding: 0 30px;
  position: relative;
  z-index: 4;
  backdrop-filter: blur(18px);
}
.brand {
  font-size: 26px;
}
.brand-mark {
  font-size: 32px;
}
.product-name {
  font-size: 11px;
  color: #7b9493;
}
.top-right {
  gap: 12px;
  margin-left: auto;
}
body[data-operational="true"] .top-right {
  gap: 8px;
}
#work-link,
#erp-login {
  text-decoration: none;
  white-space: nowrap;
}
@media (min-width: 701px) {
  body[data-operational="true"] .intro {
    right: 270px;
  }
}
.dev-label {
  display: none;
}
.person {
  display: none;
}
.mode-chip {
  font-size: 10px;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: #f2eedc;
  border-color: #e5dcc0;
  color: #8b794e;
}
main {
  padding: 0;
  max-width: 1600px;
  position: relative;
}
.intro {
  position: absolute;
  z-index: 5;
  right: 128px;
  top: -55px;
  margin: 0;
  gap: 0;
}
.intro > div:first-child {
  display: none;
}
.intro-actions {
  gap: 8px;
}
.view-switch {
  border-radius: 20px;
  padding: 3px;
  border-color: #dde8e7;
  background: #e9f0ef;
}
.view-switch button {
  border-radius: 16px;
  padding: 7px 17px;
  min-width: 80px;
  font-size: 10px;
}
.view-switch .selected {
  color: #3e6862;
  box-shadow: 0 2px 5px #33534e0d;
}
.theme-button {
  width: 33px;
  height: 33px;
  font-size: 21px;
  border-color: #dbe5e1;
}
.world-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: relative;
}
.scene-top {
  height: 40px;
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  padding: 0 28px;
  border: 0;
  background: linear-gradient(#edf5f6b8, transparent);
  font-size: 9px;
  pointer-events: none;
}
.scene-top > * {
  pointer-events: auto;
}
.scene-caption {
  font-size: 9px;
  color: #5c7c7b;
  background: #f9fbf4c9;
  padding: 6px 10px;
  border-radius: 20px;
  box-shadow: 0 3px 15px #5a7e8922;
}
.quiet-caption {
  visibility: hidden;
}
.text-button {
  color: #5d7c7d;
  background: #fffaf1c4;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 15px;
}
.text-button span {
  font-size: 9px;
}
.viewport {
  height: min(91.5vw, 1464px);
  min-height: 900px;
  max-height: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 8% 26%, #fae4d8ba, transparent 30%),
    radial-gradient(ellipse at 94% 48%, #f5e4deaa, transparent 30%),
    radial-gradient(ellipse at 50% 83%, #eef5f3aa, transparent 38%),
    linear-gradient(180deg, #bdd9e9 0%, #e2e9eb 39%, #dce7eb 68%, #c4e0ed 100%);
  isolation: isolate;
}
.viewport:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 48%,
    #eaf1ed44 100%
  );
  z-index: 0;
}
#scene {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  position: absolute;
  z-index: 1;
}
#camera {
  transform-origin: 50% 50%;
  transition: transform 0.2s ease-out;
}
.world-title {
  width: 680px;
  height: 160px;
  top: 24px;
  z-index: 2;
}
.world-title #lettering {
  height: 110px;
  opacity: 0;
  pointer-events: none;
}
.world-title small {
  display: none;
}
.title-cloud {
  display: none;
}
#title-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 7px 7px #66868a19);
}
.scene-theme {
  position: absolute;
  top: 75px;
  left: 9%;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  z-index: 3;
  background: radial-gradient(
    circle at 35% 28%,
    #fff4b9 0%,
    #fbe28e 55%,
    #f6ce6a 100%
  );
  box-shadow:
    0 0 35px 10px #fff1b766,
    0 0 70px 30px #fff3c044,
    inset 2px 3px 9px #fff9d888;
  transition:
    background 0.6s,
    box-shadow 0.6s;
  color: #f1bf5a;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.scene-theme span {
  font-size: 0;
}
.scene-theme:hover {
  transform: scale(1.04);
}
.ambient-cloud {
  z-index: 0;
  opacity: 0.76;
  width: 210px;
  height: 65px;
  background: radial-gradient(
    ellipse at 30% 20%,
    #fffdf7,
    #f5e9e3 70%,
    #dacfd14d
  );
  border-radius: 70%;
  filter: blur(1px) drop-shadow(0 18px 20px #a0bac620);
  pointer-events: none;
}
.ambient-cloud:before,
.ambient-cloud:after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
  filter: none;
}
.ambient-cloud:before {
  width: 100px;
  height: 90px;
  left: 38px;
  top: -35px;
}
.ambient-cloud:after {
  width: 90px;
  height: 75px;
  right: 25px;
  top: -19px;
}
.cloud-one {
  top: 16%;
  left: -6%;
  transform: scale(1.12);
  opacity: 0.72;
}
.cloud-two {
  top: 40%;
  right: -5%;
  transform: scale(1.3);
}
.cloud-three {
  bottom: 4%;
  left: 50%;
  transform: scale(1.3);
  opacity: 0.85;
}
.cloud-four {
  top: 5%;
  right: 6%;
  transform: scale(0.6);
  opacity: 0.7;
}
.cloud-five {
  bottom: 22%;
  left: -3%;
  transform: scale(0.7);
  opacity: 0.8;
}
.art-image {
  pointer-events: none;
  transition:
    filter 0.65s,
    opacity 0.4s;
}
.building {
  transform-origin: 0 0;
  transition:
    transform 0.22s,
    filter 0.6s;
}
.world-node:hover .building,
.world-node:focus-visible .building,
.world-node.is-hovered .building {
  transform: translateY(-5px);
}
.world-node {
  cursor: pointer;
  outline: none;
}
.node-hitshape {
  fill: transparent;
  stroke: transparent;
  stroke-width: 3;
  pointer-events: fill;
}
.world-node:focus-visible .node-hitshape {
  stroke: #557b8c;
  stroke-width: 3;
  stroke-dasharray: 5 5;
  filter: drop-shadow(0 0 4px #fff);
}
.selection-ring {
  stroke: #fff6d4;
  stroke-width: 3;
  stroke-dasharray: 5 6;
  fill: #fff6d420;
  opacity: 0;
}
.world-node.is-selected .selection-ring {
  opacity: 1;
}
.world-labels {
  pointer-events: none;
}
.world-labels > [data-node] {
  pointer-events: visiblePainted;
  cursor: pointer;
}
.node-label {
  filter: drop-shadow(0 6px 9px #627f8a19);
  transition: transform 0.2s;
}
.label-bg {
  fill: #fffdf6f5;
  stroke: #fff8;
  stroke-width: 1;
  filter: none;
}
.place-name {
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  fill: #354a4e;
}
.place-description {
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  fill: #7a8989;
}
.status-dot {
  fill: #a6b1aa;
  opacity: 0.7;
}
.world-labels .is-selected .label-bg,
.world-labels .is-selected .label-bg {
  stroke: #9eb5ad;
  stroke-width: 1.5;
  fill: #fffff9;
}
.world-labels > [data-node]:hover .label-bg {
  fill: #fff;
  stroke: #a6bcb7;
}
.night-lights {
  opacity: 0;
  filter: url(#night-bloom);
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.7s;
}
.agent-avatar,
.human-avatar {
  pointer-events: none;
  filter: drop-shadow(0 2px 2px #496a6a44);
}
.attention-signal {
  filter: drop-shadow(0 3px 4px #77725d22);
  pointer-events: none;
}
.map-bottom {
  height: 42px;
  padding: 0 28px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 84px;
  background: none;
  z-index: 2;
  pointer-events: none;
}
.map-bottom > * {
  pointer-events: auto;
}
.map-hint {
  font-size: 9px;
  color: #637f8a;
  background: #f9fcf4c7;
  padding: 7px 12px;
  border-radius: 20px;
  box-shadow: 0 3px 12px #57738c10;
}
.zoom-tools {
  height: 34px;
  border-radius: 20px;
  border-color: #fff9;
  background: #fffdf6dd;
  backdrop-filter: blur(12px);
}
.zoom-tools button {
  height: 32px;
  width: 34px;
  font-size: 19px;
}
.zoom-tools output {
  font-size: 10px;
  min-width: 42px;
}
.metrics {
  position: relative;
  z-index: 3;
  min-height: 78px;
  margin: 0 24px 18px;
  padding: 0 20px;
  background: #fffdf5ed;
  border: 1px solid #fff9;
  border-radius: 20px;
  box-shadow: 0 8px 30px #5b7f8c16;
  backdrop-filter: blur(20px);
}
.metrics > button {
  max-width: none;
  justify-content: center;
  gap: 11px;
  padding: 0 15px;
  border-color: #d9e4df;
}
.metrics > button:first-child {
  padding-left: 0;
}
.metric-icon {
  width: 34px;
  height: 34px;
  font-size: 21px;
  border-radius: 11px;
}
.metrics strong {
  font-size: 20px;
  font-weight: 600;
}
.metrics small {
  font-size: 10px;
  letter-spacing: 0.1px;
}
.sync-status {
  max-width: 260px;
  font-size: 10px;
  color: #7b9190;
  line-height: 1.5;
}
.page-footer {
  padding: 0 30px 20px;
  font-size: 9px;
  color: #718c95;
  justify-content: space-between;
}
.page-footer > span:last-child {
  font-size: 9px;
  letter-spacing: 1px;
}
.control-panel {
  padding: 84px 6% 36px;
  min-height: 760px;
  background: linear-gradient(#edf4f1, #f8fbf6);
  margin: 0;
}
.control-heading h2 {
  font-size: 32px;
  color: var(--ink);
}
.control-heading > span {
  font-size: 11px;
}
.source-card {
  background: #fffefa94;
  min-height: 80px;
}
.source-card strong {
  font-size: 12px;
}
.source-card small {
  font-size: 10px;
}
.task-row {
  font-size: 12px;
  padding: 19px 0;
  grid-template-columns: minmax(230px, 1fr) 120px 135px 110px;
}
.task-row button {
  font-size: 13px;
}
.task-row small {
  font-size: 10px;
}
.task-meta {
  font-size: 11px;
}
.status-badge {
  font-size: 10px;
  padding: 6px 10px;
}
.filters {
  gap: 10px;
}
.filters select,
.filters input {
  font-size: 12px;
}
.search {
  flex-basis: calc(100% - 520px);
}
.control-panel h3 {
  font-size: 13px;
  margin-top: 32px;
}
.event-row {
  font-size: 12px;
}
.event-row button {
  font-size: 12px;
}
.event-row time,
.event-row small {
  font-size: 10px;
}
.world-shell:has(#control-panel:not([hidden])) .metrics {
  margin-top: 0;
}
.world-shell:has(#control-panel:not([hidden])) .scene-top {
  background: #eff6f0;
}
.world-shell:has(#control-panel:not([hidden])) {
  background: #f8fbf6;
}
#detail {
  width: min(460px, 100%);
  padding: 30px;
  background: #fcfcf6f7;
  border-color: #fff9;
  border-radius: 24px 0 0 24px;
  backdrop-filter: blur(24px);
}
#detail .detail-icon {
  background: #e8f0e9;
  width: 66px;
  height: 66px;
  margin-top: 26px;
}
#detail .detail-icon svg {
  width: 34px;
  height: 34px;
}
#detail h2 {
  font-size: 34px;
}
#detail p {
  font-size: 13px;
}
#detail .detail-fact {
  font-size: 11px;
}
#detail .detail-task {
  font-size: 13px;
}
#detail .detail-task > small {
  font-size: 10px;
}
.detail-note {
  font-size: 12px;
  background: #ecf1e8;
}
.art-install-notice {
  display: none;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 15px 20px;
  max-width: 500px;
  border-radius: 12px;
  background: #fff8e7;
  color: #907d58;
  font-size: 12px;
  line-height: 1.5;
}
.art-incomplete .art-install-notice {
  display: block;
}
body.night {
  background: #253954;
  --ink: #e9ece6;
  --muted: #a2b7c3;
  --line: #526477;
  --paper: #334861;
}
.night .topbar {
  background: #263b53e8;
  border-color: #566c7955;
}
.night .brand,
.night .view-switch .selected {
  color: #d5e2db;
}
.night .product-name {
  color: #a1b7c4;
}
.night .view-switch {
  background: #20354d;
  border-color: #4a6074;
}
.night .view-switch .selected {
  background: #425d70;
}
.night .mode-chip {
  background: #494f53;
  color: #ded5af;
  border-color: #777859;
}
.night .viewport {
  background:
    radial-gradient(ellipse at 20% 20%, #687f9b44, transparent 35%),
    radial-gradient(ellipse at 80% 60%, #7e719333, transparent 45%),
    linear-gradient(#172c4b, #3d5575 55%, #687e99);
}
.night .viewport:after {
  background-image:
    radial-gradient(circle at 20% 30%, #fff4ce99 0 1px, transparent 1.8px),
    radial-gradient(circle at 70% 14%, #fffbe1bb 0 1.5px, transparent 2px),
    radial-gradient(circle at 50% 80%, #fff5d899 0 1px, transparent 1.5px);
  background-size:
    170px 190px,
    260px 230px,
    340px 310px;
  opacity: 0.65;
  z-index: 0;
}
.night .scene-top {
  background: linear-gradient(#233b5488, transparent);
}
.night .scene-caption,
.night .text-button {
  background: #405970b9;
  color: #d0dbe0;
}
.night .scene-theme {
  background: radial-gradient(circle at 35% 30%, #fffbdb, #e9ecd4 68%, #bfcad0);
  box-shadow:
    0 0 35px #dce6ed44,
    inset 3px 3px 8px #fffce7;
  color: #d7dfdc;
}
.night .scene-theme:after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  top: -13px;
  right: -17px;
  background: #223b58;
  box-shadow: -4px 3px 10px #223b5866;
}
.night .ambient-cloud {
  background: radial-gradient(
    ellipse at 30% 20%,
    #a4b8c6,
    #7a8fa7 75%,
    #72869c55
  );
  opacity: 0.32;
}
.night .building {
  filter: none;
}
.night .art-image {
  filter: brightness(0.64) saturate(0.73) hue-rotate(7deg);
}
.night .night-lights {
  opacity: 0.7;
}
.night #title-art {
  filter: brightness(0.88) drop-shadow(0 5px 13px #e2f0e91c);
}
.night .label-bg {
  fill: #f5f7efd9;
  stroke: #ffffff55;
}
.night .place-name {
  fill: #344d58;
}
.night .place-description {
  fill: #73828b;
}
.night .world-labels .is-selected .label-bg {
  fill: #fffcef;
  stroke: #d5d8c0;
}
.night .world-labels > [data-node]:hover .label-bg {
  fill: #fffdf4;
}
.night .metrics {
  background: #2d455ee8;
  border-color: #8a9caa33;
  color: #e7ebe3;
}
.night .metrics > button {
  border-color: #6b819655;
}
.night .metric-icon {
  background: #ffffff0b;
}
.night .sync-status {
  color: #b0c4c7;
}
.night .map-hint,
.night .zoom-tools {
  background: #405872d4;
  color: #d9e4df;
  border-color: #8da0ab55;
}
.night .page-footer {
  color: #a4bac9;
}
.night .control-panel {
  background: linear-gradient(#233b52, #2f455a);
}
.night .world-shell:has(#control-panel:not([hidden])) {
  background: #2f455a;
}
.night .source-card {
  background: #3b536466;
}
.night .world-shell:has(#control-panel:not([hidden])) .scene-top {
  background: #2c4558;
}
.night #detail {
  background: #2d455bf5;
  border-color: #6f839055;
}
.night #detail .detail-icon,
.night .detail-note {
  background: #435d6b;
}
.night .detail-icon svg {
  filter: brightness(1.4);
}
@media (min-width: 1600px) {
  .viewport {
    height: 1464px;
    min-height: 1464px;
  }
  .world-title {
    width: 760px;
    height: 180px;
    top: 35px;
  }
  .scene-theme {
    width: 96px;
    height: 96px;
    top: 90px;
  }
}
@media (max-width: 1100px) {
  .viewport {
    min-height: 830px;
    height: 96vw;
  }
  .world-title {
    width: 530px;
    height: 140px;
    top: 34px;
    transform: translateX(-50%);
  }
  .scene-theme {
    width: 62px;
    height: 62px;
    top: 70px;
    left: 7%;
  }
  .scene-theme:after {
    transform: scale(0.8);
  }
  .topbar {
    padding: 0 22px;
  }
  .product-name {
    display: none;
  }
  .top-divider {
    display: none;
  }
  .intro {
    right: 116px;
  }
  .metrics {
    margin: 0 16px 14px;
    padding: 0 15px;
  }
  .metrics > button {
    padding: 0 10px;
  }
  .sync-status {
    max-width: 190px;
    font-size: 9px;
  }
  .source-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .map-bottom {
    bottom: 94px;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 65px;
    padding: 0 16px;
  }
  .topbar .brand {
    font-size: 23px;
  }
  .brand-mark {
    font-size: 30px;
  }
  .top-right {
    gap: 0;
  }
  .mode-chip {
    padding: 7px 9px;
    font-size: 9px;
  }
  .intro {
    position: relative;
    right: auto;
    top: auto;
    height: 58px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: #f6faf6d9;
  }
  .intro-actions {
    width: 100%;
    gap: 12px;
    justify-content: space-between;
  }
  .view-switch {
    flex: 1;
    margin: 0;
  }
  .view-switch button {
    font-size: 11px;
    padding: 8px;
  }
  .theme-button {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .scene-top {
    height: 36px;
    padding: 0 14px;
  }
  .viewport {
    height: 760px;
    min-height: 760px;
  }
  .world-title {
    width: 420px;
    height: 115px;
    top: 40px;
    transform: translateX(-50%);
  }
  #scene {
    width: 950px;
    height: 851px;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
  }
  .scene-theme {
    width: 42px;
    height: 42px;
    top: 70px;
    left: 18px;
  }
  .night .scene-theme:after {
    width: 35px;
    height: 35px;
    top: -6px;
    right: -10px;
  }
  .ambient-cloud {
    transform: scale(0.6);
  }
  .map-bottom {
    position: relative;
    height: 47px;
    bottom: auto;
    background: #d9e8ed;
    padding: 0 13px;
  }
  .map-hint {
    max-width: 180px;
    font-size: 8px;
    line-height: 1.5;
    padding: 6px 9px;
  }
  .metrics {
    margin: 0 12px 14px;
    padding: 20px 14px 12px;
    border-radius: 17px;
    gap: 18px 0;
  }
  .metrics > button {
    justify-content: flex-start;
    gap: 10px;
    padding: 0 12px;
  }
  .metrics small {
    font-size: 10px;
  }
  .sync-status {
    max-width: none;
    font-size: 9px;
    border-color: #d2dfd9;
    padding-top: 13px;
  }
  .page-footer {
    padding: 2px 15px 18px;
    justify-content: center;
    font-size: 8px;
    gap: 8px;
  }
  .page-footer > span:last-child {
    display: none;
  }
  .control-panel {
    padding: 62px 16px 25px;
  }
  .control-heading h2 {
    font-size: 27px;
  }
  .task-row {
    grid-template-columns: 1fr auto;
    font-size: 12px;
    gap: 10px;
  }
  .task-row button {
    font-size: 12px;
  }
  .task-row > time {
    display: none;
  }
  .task-meta {
    font-size: 10px;
  }
  .source-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .source-card {
    padding: 12px;
    min-height: 85px;
  }
  .source-card strong {
    font-size: 11px;
  }
  .source-card small {
    font-size: 9px;
  }
  .filters select,
  .filters input {
    font-size: 11px;
  }
  .filters {
    gap: 8px;
  }
  .search {
    flex-basis: 100%;
  }
  .event-row button {
    font-size: 11px;
  }
  #detail {
    padding: 24px;
  }
  .night .intro {
    background: #273d54;
  }
  .night .map-bottom {
    background: #4b6380;
  }
  .night .metrics {
    border-color: #7b8c9a44;
  }
  .art-install-notice {
    width: 85%;
    bottom: 55px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .art-image,
  .building,
  .scene-theme,
  #camera {
    transition: none !important;
  }
  .ambient-cloud {
    animation: none !important;
  }
}
@media (max-width: 700px) {
  .world-title {
    width: calc(100% - 28px);
    max-width: 420px;
  }
  .scene-theme {
    display: none;
  }
}
.art-image.art-night {
  opacity: 0;
}
.night .art-image.art-day {
  opacity: 1;
  filter: brightness(0.64) saturate(0.75);
}
.night .art-image.art-night {
  opacity: 1;
  filter: none;
}
.art-image {
  transition: opacity 0.65s;
}
.ambient-cloud {
  animation: cloud-drift 28s ease-in-out infinite alternate;
}
.cloud-two,
.cloud-four {
  animation-delay: -12s;
}
@keyframes cloud-drift {
  from {
    translate: -5px -2px;
  }
  to {
    translate: 7px 4px;
  }
}
