* {
  box-sizing: border-box;
}

:root {
  color: #eafff1;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    Arial,
    sans-serif;
  background: #04150f;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

#app {
  position: relative;
}

body.is-scaled #app {
  width: calc(1600px * var(--fit-scale));
  height: calc(900px * var(--fit-scale));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(186, 255, 198, 0.82);
  outline-offset: 2px;
}

.nav-bookmark {
  position: fixed;
  top: 18px;
  right: 0;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  min-width: 132px;
  padding: 0 16px 0 18px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(135deg, #165dff, #0e42d2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(22, 93, 255, 0.28);
  transform: translateX(calc(100% - 42px));
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.nav-bookmark::before {
  width: 8px;
  height: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.86);
  border-right: 2px solid rgba(255, 255, 255, 0.62);
  content: "";
}

.nav-bookmark:hover,
.nav-bookmark:focus-visible {
  transform: translateX(0);
  box-shadow: 0 14px 30px rgba(22, 93, 255, 0.38);
}

.screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 1280px;
  min-height: 760px;
  overflow: hidden;
  padding: 22px 26px 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(106, 255, 185, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(245, 255, 241, 0.16), transparent 28%),
    #03150f;
}

body.is-scaled .screen {
  width: 1600px;
  height: 900px;
  min-width: 0;
  min-height: 0;
  zoom: var(--fit-scale);
}

.screen::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: url("./assets/baiyunshan-panorama.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.01);
}

.screen::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 22, 17, 0.74), rgba(4, 22, 18, 0.15) 28%, rgba(4, 22, 18, 0.18) 68%, rgba(3, 18, 16, 0.76)),
    linear-gradient(180deg, rgba(236, 255, 238, 0.2), rgba(1, 11, 9, 0.14) 28%, rgba(1, 8, 7, 0.92) 100%);
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(95, 255, 191, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 255, 191, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.topbar,
.left-stack,
.right-stack,
.center-stage,
.bottom-grid,
.alert-bar {
  position: relative;
  z-index: 2;
}

.topbar {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  align-items: start;
  height: 88px;
}

.top-meta,
.location {
  display: flex;
  gap: 16px;
  align-items: center;
  color: rgba(234, 255, 241, 0.88);
  font-size: 14px;
  white-space: nowrap;
}

.top-meta b {
  font: inherit;
}

.top-meta i,
.location i {
  color: #8effc5;
  font-size: 18px;
}

.location {
  justify-content: flex-end;
}

.brand {
  text-align: center;
}

.brand h1 {
  margin: 0;
  color: #083d34;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 34px rgba(197, 255, 223, 0.42);
  font-size: clamp(34px, 2.6vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 900;
}

.brand p {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin: 10px 0 0;
  color: #073d34;
  font-size: 24px;
  font-weight: 800;
}

.brand p span {
  display: block;
  width: 86px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(5, 68, 56, 0.8), transparent);
}

.system-nav {
  position: relative;
  z-index: 20;
  display: inline-flex;
  gap: 8px;
  margin-top: 9px;
  pointer-events: auto;
}

.system-nav a {
  position: relative;
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(5, 68, 56, 0.36);
  border-radius: 8px;
  background: rgba(227, 255, 234, 0.28);
  color: #073d34;
  padding: 0 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
}

.system-nav a:hover,
.system-nav a:focus-visible {
  border-color: rgba(142, 255, 197, 0.72);
  background: rgba(142, 255, 197, 0.42);
}

.panel-stack {
  position: absolute;
  top: 116px;
  display: grid;
  gap: 12px;
  width: 21.8vw;
  min-width: 330px;
  max-width: 440px;
}

.left-stack {
  left: 26px;
  z-index: 4;
}

.right-stack {
  right: 26px;
  width: 23vw;
  min-width: 360px;
  max-width: 470px;
  z-index: 4;
}

.panel,
.trend-card,
.alert-bar {
  border: 1px solid rgba(126, 231, 211, 0.42);
  background:
    linear-gradient(180deg, rgba(12, 57, 53, 0.72), rgba(5, 38, 37, 0.78)),
    rgba(5, 37, 34, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(235, 255, 250, 0.08),
    0 18px 42px rgba(0, 11, 9, 0.28);
  backdrop-filter: blur(10px);
}

.panel {
  border-radius: 8px;
  padding: 15px 16px;
}

.panel-heading,
.trend-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: #ecfff3;
  font-size: 20px;
  font-weight: 800;
}

.panel-heading span,
.trend-card header span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-heading i,
.trend-card header i {
  color: #83ffd0;
  font-size: 25px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(127, 247, 211, 0.42);
  border-radius: 6px;
  color: #aaf8d1;
  background: rgba(26, 91, 78, 0.44);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.icon-btn:hover {
  border-color: rgba(153, 255, 204, 0.78);
  color: #effff4;
  background: rgba(60, 150, 103, 0.54);
  transform: translateY(-1px);
}

.icon-btn.is-spinning i {
  animation: spin 0.62s ease both;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resource-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 9px;
  align-items: center;
  min-height: 66px;
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.resource-item[role="button"]:hover,
.resource-item.active {
  background: rgba(71, 164, 112, 0.18);
  box-shadow: inset 0 0 0 1px rgba(139, 255, 196, 0.26);
}

.resource-item[role="button"]:hover {
  transform: translateY(-1px);
}

.resource-item i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(122, 255, 196, 0.28);
  border-radius: 50%;
  color: #98ffc5;
  background: rgba(63, 173, 122, 0.16);
  font-size: 25px;
}

.resource-item p,
.water-main p {
  margin: 0;
  color: rgba(230, 255, 239, 0.72);
  font-size: 13px;
}

.resource-item strong {
  grid-column: 2;
  color: #baffbc;
  font-size: 24px;
  line-height: 1;
}

small {
  color: rgba(226, 255, 232, 0.74);
  font-size: 12px;
}

.status-dot {
  width: auto;
  padding: 3px 8px;
  border: 1px solid rgba(115, 255, 202, 0.32);
  border-radius: 999px;
  color: #8fffc1;
  font-size: 12px;
  font-weight: 700;
  background: rgba(35, 106, 83, 0.28);
}

.species-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}

.ring-chart {
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(7, 41, 36, 0.9) 0 42%, transparent 43%),
    conic-gradient(#80f3a1 0 40%, #3aa7ff 40% 58%, #ff9a67 58% 82%, #d7ffe1 82% 100%);
  box-shadow: 0 0 28px rgba(106, 255, 191, 0.28);
}

.ring-chart span {
  color: #f1fff2;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.species-copy p {
  margin: 0 0 8px;
  color: rgba(237, 255, 242, 0.92);
  font-size: 17px;
}

.species-copy p strong {
  color: #baffbc;
  font-size: 34px;
}

.species-copy ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.species-copy li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(239, 255, 244, 0.82);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
}

.plant {
  background: #80f3a1;
}

.animal {
  background: #3aa7ff;
}

.insect {
  background: #ff9a67;
}

.other {
  background: #d7ffe1;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.thumb,
.quick-prompts button,
.mode-tabs button {
  border: 1px solid rgba(111, 232, 204, 0.24);
  border-radius: 6px;
  color: rgba(236, 255, 242, 0.8);
  background: rgba(7, 53, 49, 0.56);
}

.thumb {
  height: 33px;
  font-size: 13px;
}

.thumb.active,
.quick-prompts button:hover,
.mode-tabs button.active,
.quick-prompts button:focus-visible,
.mode-tabs button:focus-visible {
  border-color: rgba(137, 255, 200, 0.66);
  color: #eaffef;
  background: rgba(48, 132, 95, 0.54);
}

.water-main {
  display: flex;
  align-items: end;
  gap: 12px;
}

.water-main strong {
  color: #baffbc;
  font-size: 35px;
  line-height: 1;
}

.micro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}

.micro-grid span {
  display: grid;
  gap: 4px;
  color: rgba(232, 255, 240, 0.66);
  font-size: 12px;
}

.micro-grid b {
  color: #e6fff1;
  font-size: 14px;
}

.water-quality {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  color: rgba(234, 255, 241, 0.7);
  font-size: 13px;
}

.water-quality b {
  color: #8dff9f;
  font-size: 17px;
}

.mini-wave {
  height: 24px;
  border: 1px solid rgba(107, 249, 206, 0.28);
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(114, 255, 189, 0.5) 8% 10%, transparent 10% 18%),
    linear-gradient(180deg, transparent, rgba(69, 255, 176, 0.16));
}

.center-stage {
  position: absolute;
  top: 112px;
  right: 25.5vw;
  left: 25.2vw;
  bottom: 178px;
  min-width: 510px;
}

.map-stage {
  position: relative;
  height: calc(100% - 90px);
  min-height: 360px;
}

.scan-ring,
.health-orbit {
  position: absolute;
  top: 44%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.scan-ring {
  border: 1px solid rgba(112, 255, 195, 0.28);
}

.ring-a {
  width: 400px;
  height: 400px;
  animation: pulse 5s ease-in-out infinite;
}

.ring-b {
  width: 520px;
  height: 520px;
  animation: pulse 6s ease-in-out infinite reverse;
}

.health-orbit {
  display: grid;
  place-items: center;
  width: 310px;
  height: 310px;
  border: 2px solid rgba(113, 255, 196, 0.56);
  background:
    radial-gradient(circle, rgba(38, 132, 91, 0.38), rgba(4, 43, 36, 0.22) 54%, transparent 65%),
    conic-gradient(from 14deg, transparent, rgba(136, 255, 198, 0.64), transparent, rgba(255, 221, 132, 0.56), transparent);
  box-shadow:
    0 0 45px rgba(104, 255, 188, 0.36),
    inset 0 0 34px rgba(129, 255, 199, 0.18);
}

.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffe18a;
  box-shadow: 0 0 14px #ffe18a;
}

.dot-a {
  top: 8%;
  left: 50%;
}

.dot-b {
  right: 4%;
  top: 52%;
}

.dot-c {
  bottom: 13%;
  left: 16%;
}

.health-card {
  text-align: center;
}

.health-card i {
  color: #9cffb8;
  font-size: 36px;
}

.health-card p {
  margin: 5px 0;
  color: #effff2;
  font-size: 18px;
  font-weight: 800;
}

.health-card strong {
  display: block;
  color: #d7ffcb;
  font-size: 98px;
  line-height: 0.9;
  text-shadow: 0 0 28px rgba(185, 255, 180, 0.6);
}

.health-card span {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 18px;
  border: 1px solid rgba(149, 255, 182, 0.54);
  border-radius: 999px;
  color: #c6ffb8;
  font-size: 18px;
  font-weight: 800;
  background: rgba(38, 113, 75, 0.42);
}

.mountain-model {
  position: absolute;
  right: 16%;
  bottom: 16px;
  left: 16%;
  height: 180px;
  filter: drop-shadow(0 25px 28px rgba(0, 0, 0, 0.42));
}

.terrain-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

.map-label {
  position: absolute;
  bottom: 26px;
  left: 50%;
  display: grid;
  gap: 4px;
  min-width: 170px;
  padding: 6px 18px;
  border: 1px solid rgba(181, 255, 218, 0.32);
  border-radius: 8px;
  background: rgba(3, 31, 27, 0.66);
  backdrop-filter: blur(8px);
  color: #f0fff3;
  text-align: center;
  transform: translateX(-50%);
}

.map-label strong {
  font-size: 26px;
}

.map-label span {
  color: rgba(235, 255, 242, 0.82);
}

.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(157, 255, 214, 0.5);
  border-radius: 50%;
  color: #cffff1;
  background: rgba(11, 66, 59, 0.68);
  box-shadow: 0 0 24px rgba(108, 255, 191, 0.3);
}

.map-pin i {
  font-size: 24px;
}

.map-pin.active {
  color: #102a1d;
  background: #9bffc5;
}

.map-pin:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(154, 255, 197, 0.46);
}

.pin-1 {
  top: 45%;
  left: 31%;
}

.pin-2 {
  top: 39%;
  right: 27%;
}

.pin-3 {
  right: 36%;
  bottom: 24%;
}

.floating-stat {
  position: absolute;
  display: grid;
  gap: 3px;
  color: rgba(239, 255, 244, 0.82);
  font-size: 14px;
}

.floating-stat strong {
  color: #baffbc;
  font-size: 24px;
}

.stat-left {
  top: 35%;
  left: 18%;
}

.stat-right {
  top: 35%;
  right: 14%;
}

.stat-bottom {
  bottom: 30%;
  left: 35%;
}

.center-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 82px;
}

.center-metrics article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 3px 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(126, 231, 211, 0.28);
  border-radius: 8px;
  background: rgba(8, 54, 48, 0.58);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.center-metrics article:hover,
.center-metrics article.active {
  border-color: rgba(151, 255, 203, 0.68);
  background: rgba(35, 101, 73, 0.68);
  transform: translateY(-2px);
}

.center-metrics i {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #aaffd0;
  background: rgba(101, 255, 182, 0.14);
  font-size: 25px;
}

.center-metrics span {
  color: rgba(233, 255, 239, 0.72);
  font-size: 13px;
}

.center-metrics strong {
  color: #baffbc;
  font-size: 22px;
  line-height: 1;
}

.center-metrics b {
  color: #d9ff9b;
  font-size: 13px;
}

.ai-panel {
  padding: 14px;
}

.ai-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.bot-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(137, 232, 255, 0.56);
  border-radius: 50%;
  color: #dffcff;
  background:
    radial-gradient(circle at 50% 42%, rgba(132, 226, 255, 0.68), rgba(34, 99, 115, 0.74) 48%, rgba(4, 43, 48, 0.88));
  font-size: 32px;
}

.ai-header h2 {
  margin: 0;
  color: #f2fff5;
  font-size: 23px;
}

.ai-header p {
  margin: 4px 0 0;
  color: rgba(232, 255, 241, 0.72);
  font-size: 13px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.mode-tabs button {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 12px;
}

.mode-tabs i {
  font-size: 16px;
}

.ai-analysis {
  display: grid;
  gap: 9px;
}

.ai-card {
  padding: 12px;
  border: 1px solid rgba(126, 231, 211, 0.28);
  border-radius: 7px;
  background: rgba(3, 39, 38, 0.72);
}

.ai-card header,
.confidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-card header span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #f1fff4;
  font-weight: 800;
}

.ai-card header i {
  color: #7fe9ff;
  font-size: 20px;
}

.ai-card header b {
  color: #baffbc;
}

.ai-card p {
  margin: 9px 0 0;
  color: rgba(237, 255, 243, 0.86);
  font-size: 14px;
  line-height: 1.62;
}

.ai-action header i {
  color: #8eff9c;
}

.confidence {
  display: grid;
  grid-template-columns: auto auto 1fr;
  padding: 2px 2px 3px;
  color: rgba(238, 255, 243, 0.72);
  font-size: 13px;
}

.confidence strong {
  color: #9affad;
}

.confidence div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(162, 255, 218, 0.18);
}

.confidence i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7af59c, #7de9ff);
}

.quick-prompts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.quick-prompts button {
  min-height: 32px;
  padding: 5px 7px;
  font-size: 12px;
}

.ai-chat {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 8px;
}

.ai-chat input {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(124, 238, 211, 0.34);
  border-radius: 6px;
  outline: none;
  color: #f1fff6;
  background: rgba(2, 26, 27, 0.72);
  padding: 0 12px;
}

.ai-chat input:focus {
  border-color: rgba(126, 255, 194, 0.82);
  box-shadow: 0 0 0 3px rgba(126, 255, 194, 0.12);
}

.ai-chat button {
  border: 0;
  border-radius: 6px;
  color: #08251f;
  background: linear-gradient(135deg, #b8ffc7, #77e8ff);
  font-weight: 800;
}

.ai-reply {
  min-height: 80px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(142, 255, 203, 0.34);
  border-radius: 7px;
  color: rgba(241, 255, 246, 0.82);
  background: rgba(8, 56, 45, 0.52);
}

.ai-reply span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #eaffef;
  font-size: 14px;
  font-weight: 800;
}

.ai-reply span b {
  color: #baffbc;
}

.ai-reply p {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.bottom-grid {
  position: absolute;
  right: 26px;
  bottom: 74px;
  left: 26px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.trend-card {
  position: relative;
  height: 138px;
  overflow: hidden;
  border-radius: 8px;
  padding: 12px 14px 10px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.trend-card:hover,
.trend-card.active {
  border-color: rgba(137, 255, 200, 0.72);
  background:
    linear-gradient(180deg, rgba(19, 76, 62, 0.82), rgba(6, 46, 42, 0.86)),
    rgba(5, 37, 34, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(235, 255, 250, 0.12),
    0 20px 46px rgba(0, 18, 11, 0.34);
}

.trend-card:hover {
  transform: translateY(-2px);
}

.trend-card.active::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #baffbc;
  box-shadow: 0 0 14px rgba(186, 255, 188, 0.86);
  content: "";
}

.trend-card header {
  justify-content: flex-start;
  margin-bottom: 5px;
  font-size: 18px;
}

.trend-card p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.trend-card strong {
  color: #baffbc;
  font-size: 34px;
  line-height: 1;
}

.trend-card b {
  margin-left: auto;
  color: rgba(225, 255, 231, 0.76);
  font-size: 13px;
}

.trend-card svg {
  position: absolute;
  right: 7px;
  bottom: 8px;
  left: 7px;
  width: calc(100% - 14px);
  height: 54px;
}

.trend-card polyline {
  fill: none;
  stroke: #7de9ff;
  stroke-width: 2.5;
}

.trend-card path {
  fill: rgba(80, 210, 194, 0.2);
}

.alert-bar {
  position: absolute;
  right: 26px;
  bottom: 20px;
  left: 26px;
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  gap: 20px;
  align-items: center;
  height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  color: rgba(239, 255, 245, 0.86);
}

.alert-bar strong {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #fff1c2;
}

.alert-bar strong i {
  color: #ffb76f;
  font-size: 22px;
}

.alert-bar b {
  color: #ffd477;
  font-size: 20px;
}

.alert-bar p {
  overflow: hidden;
  margin: 0;
  color: rgba(245, 255, 247, 0.86);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-bar button {
  display: flex;
  gap: 4px;
  align-items: center;
  border: 0;
  color: #dfffea;
  background: transparent;
}

.alert-bar button:hover {
  color: #baffbc;
}

.alert-drawer {
  position: absolute;
  inset: 0;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.alert-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 12, 10, 0.34);
  cursor: default;
}

.drawer-panel {
  position: absolute;
  top: 112px;
  right: 26px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  width: 430px;
  max-height: calc(100% - 190px);
  padding: 16px;
  border: 1px solid rgba(139, 255, 207, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 60, 55, 0.96), rgba(3, 34, 32, 0.96)),
    rgba(4, 34, 31, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(235, 255, 250, 0.12),
    0 26px 72px rgba(0, 7, 6, 0.48);
  backdrop-filter: blur(12px);
  transform: translateX(24px);
  transition: transform 0.22s ease;
}

.alert-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-panel header,
.drawer-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-panel header span {
  color: rgba(234, 255, 241, 0.66);
  font-size: 12px;
}

.drawer-panel h2 {
  margin: 3px 0 0;
  color: #f2fff5;
  font-size: 23px;
}

.alert-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.alert-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(126, 231, 211, 0.24);
  border-radius: 8px;
  background: rgba(5, 41, 38, 0.72);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.alert-item:hover,
.alert-item.active {
  border-color: rgba(255, 221, 132, 0.62);
  background: rgba(72, 75, 42, 0.5);
}

.alert-item:hover {
  transform: translateX(-2px);
}

.alert-item div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.alert-item b {
  padding: 3px 8px;
  border-radius: 999px;
  color: #201909;
  font-size: 12px;
  background: #ffd477;
}

.alert-item strong {
  color: #f2fff5;
  font-size: 16px;
}

.alert-item time,
.alert-item span,
.alert-item p {
  color: rgba(236, 255, 242, 0.76);
  font-size: 13px;
}

.alert-item p {
  margin: 0;
  line-height: 1.55;
}

.alert-item span {
  color: #baffbc;
}

.drawer-panel footer {
  justify-content: flex-end;
}

.drawer-panel footer button {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(126, 255, 194, 0.42);
  border-radius: 6px;
  color: #0a2d24;
  background: linear-gradient(135deg, #b8ffc7, #77e8ff);
  font-weight: 800;
}

.drawer-panel footer button + button {
  color: #eaffef;
  background: rgba(35, 106, 83, 0.52);
}

.toast {
  position: absolute;
  right: 32px;
  bottom: 126px;
  z-index: 35;
  max-width: 360px;
  padding: 10px 14px;
  border: 1px solid rgba(151, 255, 203, 0.52);
  border-radius: 8px;
  color: #effff4;
  background: rgba(5, 45, 40, 0.94);
  box-shadow: 0 16px 38px rgba(0, 10, 8, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.46;
    transform: translate(-50%, -50%) scale(0.96);
  }

  50% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1.02);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1440px), (max-height: 850px) {
  .screen {
    padding: 18px 20px;
  }

  .brand h1 {
    font-size: 36px;
  }

  .brand p {
    font-size: 20px;
  }

  .panel-stack {
    top: 98px;
    width: 340px;
    min-width: 340px;
  }

  .right-stack {
    width: 380px;
    min-width: 380px;
  }

  .center-stage {
    top: 98px;
    right: 410px;
    left: 380px;
    bottom: 190px;
  }

  .health-orbit {
    width: 250px;
    height: 250px;
  }

  .ring-a {
    width: 330px;
    height: 330px;
  }

  .ring-b {
    width: 430px;
    height: 430px;
  }

  .health-card strong {
    font-size: 78px;
  }

  .mountain-model {
    right: 8%;
    left: 8%;
    height: 150px;
  }

  .bottom-grid {
    bottom: 66px;
  }

  .trend-card {
    height: 124px;
  }

  .drawer-panel {
    top: 96px;
    right: 20px;
    width: 390px;
    max-height: calc(100% - 174px);
    padding: 13px;
  }

  .drawer-panel h2 {
    font-size: 20px;
  }

  .toast {
    right: 24px;
    bottom: 112px;
  }

  .left-stack .panel {
    padding: 10px 11px;
  }

  .left-stack .panel-heading {
    margin-bottom: 8px;
    font-size: 17px;
  }

  .left-stack .panel-heading i {
    font-size: 21px;
  }

  .left-stack .resource-grid {
    gap: 5px 7px;
  }

  .left-stack .resource-item {
    grid-template-columns: 34px 1fr;
    column-gap: 7px;
    min-height: 48px;
  }

  .left-stack .resource-item i {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .left-stack .resource-item p {
    font-size: 12px;
  }

  .left-stack .resource-item strong {
    font-size: 21px;
  }

  .left-stack .species-layout {
    grid-template-columns: 82px 1fr;
    gap: 8px;
  }

  .left-stack .ring-chart {
    width: 76px;
    height: 76px;
  }

  .left-stack .ring-chart span {
    font-size: 12px;
  }

  .left-stack .species-copy p {
    margin-bottom: 5px;
    font-size: 14px;
  }

  .left-stack .species-copy p strong {
    font-size: 28px;
  }

  .left-stack .species-copy ul {
    gap: 3px;
  }

  .left-stack .species-copy li {
    font-size: 11px;
  }

  .left-stack .thumb-row {
    gap: 6px;
    margin-top: 8px;
  }

  .left-stack .thumb {
    height: 27px;
    font-size: 12px;
  }

  .left-stack .water-main strong {
    font-size: 29px;
  }

  .left-stack .micro-grid {
    gap: 5px;
    margin: 9px 0 7px;
  }

  .left-stack .micro-grid span {
    font-size: 11px;
  }

  .left-stack .micro-grid b {
    font-size: 12px;
  }

  .left-stack .water-quality {
    gap: 6px;
    font-size: 12px;
  }

  .left-stack .mini-wave {
    height: 18px;
  }

  .ai-header {
    grid-template-columns: 44px 1fr;
    gap: 9px;
    margin-bottom: 9px;
  }

  .bot-avatar {
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .ai-header h2 {
    font-size: 20px;
  }

  .ai-header p {
    font-size: 12px;
  }

  .mode-tabs {
    gap: 5px;
    margin-bottom: 7px;
  }

  .mode-tabs button {
    height: 27px;
    font-size: 11px;
  }

  .ai-analysis {
    gap: 6px;
  }

  .ai-card {
    padding: 8px 9px;
  }

  .ai-card p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.42;
  }

  .confidence {
    font-size: 12px;
  }

  .quick-prompts {
    gap: 5px;
    margin: 8px 0;
  }

  .quick-prompts button {
    min-height: 27px;
    font-size: 11px;
  }

  .ai-chat {
    grid-template-columns: 1fr 70px;
    gap: 6px;
  }

  .ai-chat input {
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .ai-chat button {
    height: 32px;
    font-size: 12px;
  }

  .ai-reply {
    min-height: 56px;
    margin-top: 7px;
    padding: 8px 9px;
  }

  .ai-reply p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.38;
  }
}
