/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --green-dark: #2a6010;
  --green-mid: #5aa728;
  --green-light: #8ed435;
  --green-pale: #c4ed78;
  --accent: #7bb50e;
  --accent2: #bee181;
  --text: #1a1a1a;
  --gray: #6b6b6b;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Exact background gradient from IMG_2971 */
  --bg-main:
    radial-gradient(
      ellipse 140% 100% at 45% 28%,
      rgba(205, 248, 100, 0.92) 0%,
      rgba(148, 215, 55, 0.8) 22%,
      rgba(80, 158, 22, 0.6) 48%,
      transparent 72%
    ),
    radial-gradient(
      ellipse 80% 70% at 85% 75%,
      rgba(65, 140, 18, 0.55) 0%,
      transparent 55%
    ),
    linear-gradient(
      168deg,
      #1e5008 0%,
      #38880c 20%,
      #5aad20 45%,
      #3d8812 70%,
      #194d06 100%
    );
}

html,
body {
  height: 100%;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  overflow: hidden;
  background: #111;
}

.hidden {
  display: none !important;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}

/* ── Scene wrapper ───────────────────────────────────────────── */
[id^="scene-"] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════════════════════ */
#scene-auth {
  background: linear-gradient(
    -40deg,
    #1c1c1c 0%,
    #263d18 14%,
    #3a6820 28%,
    #5a8e22 42%,
    #7bb50e 56%,
    #a8cc3a 68%,
    #5a8e22 78%,
    #2d5218 88%,
    #1c1c1c 100%
  );
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  overflow-y: auto;

  .cs-wrap {
    position: absolute;
    top: 20px;
    right: 20px;
  }
}

.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
}
.auth-robot {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}
.auth-robot-video {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
}
.auth-logo-text {
  color: white;
  text-align: center;
  margin-top: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.auth-logo-text h1 {
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 4px;
  font-family: "Raleway", sans-serif;
}
.auth-logo-text p {
  font-size: 14px;
  opacity: 0.88;
  margin-top: -2px;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#auth-error {
  background: rgba(220, 60, 60, 0.9);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.auth-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.auth-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-dark);
  text-align: center;
}
.auth-card p {
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  line-height: 1.4;
}

.auth-email-badge {
  background: linear-gradient(130deg, var(--green-mid), var(--green-light));
  color: white;
  border-radius: 30px;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(90, 167, 40, 0.35);
  border-radius: 30px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap .auth-input {
  padding-right: 50px;
}
.pw-eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s;
}
.pw-eye-btn:hover {
  color: var(--accent);
}

.auth-hint {
  display: block;
  font-size: 12px;
  color: #4a5568;
  margin-bottom: 6px;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

/* "NEXT →" style primary button — matches Group 32/33 */
.auth-btn {
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  background: linear-gradient(120deg, #243a0a 0%, #1a1a1a 100%);
  color: white;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition:
    opacity 0.15s,
    transform 0.1s;
}
.auth-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.auth-btn-link {
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
  text-decoration: underline;
  padding: 4px;
}

.auth-motto {
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  line-height: 1.65;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 0 8px 8px 0;
  margin-top: 6px;
  backdrop-filter: blur(4px);
}

/* ══════════════════════════════════════════════════════════════
   MAIN MENU
══════════════════════════════════════════════════════════════ */
#scene-menu {
  background: linear-gradient(
    -40deg,
    #1c1c1c 0%,
    #263d18 14%,
    #3a6820 28%,
    #5a8e22 42%,
    #7bb50e 56%,
    #a8cc3a 68%,
    #5a8e22 78%,
    #2d5218 88%,
    #1c1c1c 100%
  );
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 10px;
  flex-shrink: 0;
}

.menu-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-logo-robot {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.menu-logo-text {
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.menu-logo-text h1 {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 3px;
  font-family: "Raleway", sans-serif;
}
.menu-logo-text p {
  font-size: 11px;
  opacity: 0.85;
  margin-top: -2px;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
}

#menu-profile-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#menu-profile-btn:active {
  background: #e8e8e8;
}
#menu-profile-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0);
}

.menu-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px 80px;
  scrollbar-width: none;
}
.menu-scroll::-webkit-scrollbar {
  display: none;
}

#menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}

.menu-btn {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
  min-height: 170px;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  background: #f5f5f5;
  display: block;
  cursor: pointer;
}
.menu-btn:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-sm);
}

.menu-icon-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.menu-btn-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  padding: 9px 8px 20px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.92) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  line-height: 1.25;
}

@media (min-width: 520px) {
  #menu-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (min-width: 800px) {
  #menu-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════════
   SHARED SCREEN HEADER
══════════════════════════════════════════════════════════════ */
.screen-header {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 14px;
  flex-shrink: 0;
  gap: 10px;
}
.screen-header h1 {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
}

/* Weather header text color */
#scene-weather .screen-header {
  color: #1a3a55;
}

/* Wrapper that covers header + controls — gradient applied here */
.scene-top-bar {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.8) 80%,
    rgba(255, 255, 255, 0) 100%
  );
}
.weather-top-bar {
  background: linear-gradient(
    to bottom,
    rgba(200, 230, 252, 0.8) 0%,
    rgba(200, 230, 252, 0.8) 80%,
    rgba(200, 230, 252, 0) 100%
  );
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.15s;
}
.back-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.back-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

/* Black SVG close button — always placed after h1 so it sits on the right */
.close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.15s;
}
.close-btn:active {
  background: rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════════════════════════
   CHAT
══════════════════════════════════════════════════════════════ */
#scene-chat {
  /* Matches chat.css: grey/white + green center */
  background: linear-gradient(
    0deg,
    rgba(232, 234, 235, 1) 0%,
    rgba(235, 235, 235, 1) 15%,
    rgba(193, 237, 166, 1) 50%,
    rgba(230, 227, 227, 1) 85%,
    rgba(232, 232, 232, 1) 100%
  );
}

.chat-top-bar {
  background: linear-gradient(
    to bottom,
    rgba(232, 232, 232, 0.85) 0%,
    rgba(232, 232, 232, 0.85) 40%,
    rgba(232, 232, 232, 0) 100%
  );
}

/* ARNI avatar widget — лицо приложения, левый угол */
#arni-widget {
  position: absolute;
  top: 70px;
  left: 14px;
  width: 150px;
  height: 150px;
  border-radius: 20px;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.3s;
}
@media (max-width: 768px) {
  #arni-widget {
    width: 120px;
    height: 120px;
    border-radius: 18px;
  }
}
@media (max-width: 480px) {
  #arni-widget {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    top: 66px;
    left: 10px;
  }
}
@media (max-width: 360px) {
  #arni-widget {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    top: 64px;
    left: 8px;
  }
}
#arni-widget.speaking {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}
.arni-avatar-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-level-bar {
  display: flex;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  flex-shrink: 0;
}
.detail-btn {
  flex: 1;
  padding: 7px 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.detail-btn.active {
  background: rgba(190, 225, 129, 0.7);
  color: var(--text);
  border-color: rgba(123, 181, 14, 0.55);
  box-shadow: 0 3px 10px rgba(123, 181, 14, 0.22);
}

#chat-messages {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 175px 14px 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
@media (max-width: 768px) {
  #chat-messages {
    padding-top: 145px;
  }
}
@media (max-width: 480px) {
  #chat-messages {
    padding-top: 115px;
    padding-bottom: 140px;
  }
}
@media (max-width: 360px) {
  #chat-messages {
    padding-top: 95px;
  }
}
#chat-messages::-webkit-scrollbar {
  display: none;
}

.detail-level-bar {
  position: absolute;
  bottom: 88px;
  left: 0;
  right: 0;
  z-index: 5;
}
#chat-attachments {
  position: absolute;
  bottom: 132px;
  left: 0;
  right: 0;
  z-index: 6;
}
.chat-input-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 14px 14px;
  z-index: 5;
}

.chat-bubble {
  max-width: 80%;
  padding: 11px 17px;
  border-radius: 22px;
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
}
.user-bubble {
  align-self: flex-end;
  background: #c1d69a; /* matches original */
  border-bottom-right-radius: 6px;
}
.bot-bubble {
  align-self: flex-start;
  background: white;
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 6px;
}
.bot-bubble a {
  color: var(--accent);
}

/* Loading dots */
.loading-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  min-width: 64px;
}
.loading-bubble::before {
  content: "ARNI";
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-right: 2px;
  opacity: 0.7;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.1s ease-in-out infinite;
}
.dot:nth-child(2) {
  animation-delay: 0.18s;
}
.dot:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-8px) scale(1.2);
    opacity: 1;
  }
}

/* Input bar */
.chat-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 2px solid rgba(123, 181, 14, 0.38);
  border-radius: 40px;
}
#chat-input {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: none;
  font-size: 17px;
  resize: none;
  min-height: 40px;
  max-height: 140px;
  line-height: 1.4;
}
#chat-input:focus {
  outline: none;
}

#chat-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.18s,
    opacity 0.15s;
  background: transparent;
}
#chat-send-btn.btn-green {
  background: rgba(123, 181, 14, 0.18);
}
#chat-send-btn.btn-stop {
  background: rgba(231, 76, 60, 0.14);
}
#chat-send-btn:active {
  opacity: 0.72;
}

.attach-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
  position: relative;
}
.attach-btn:active {
  background: rgba(123, 181, 14, 0.15);
}

/* Attach popup menu */
.attach-menu {
  position: absolute;
  bottom: 68px;
  left: 10px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  z-index: 50;
  min-width: 170px;
  animation: fadeSlideUp 0.15s ease;
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.attach-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid #f2f2f2;
  transition: background 0.12s;
}
.attach-opt:last-child {
  border-bottom: none;
}
.attach-opt:active {
  background: #f5f5f5;
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 14px 0;
  background: rgba(255, 255, 255, 0.6);
}
.attach-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(123, 181, 14, 0.15);
  border: 1px solid rgba(123, 181, 14, 0.35);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  max-width: 180px;
}
.attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2a5a10;
}
.attach-remove {
  font-size: 14px;
  line-height: 1;
  color: #888;
  flex-shrink: 0;
}

/* Voice recording state */
#chat-send-btn.recording {
  animation: pulse-mic 1s ease-in-out infinite;
}
#chat-send-btn svg {
  display: block;
  flex-shrink: 0;
}
@keyframes pulse-mic {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

@media (max-width: 480px) {
  .chat-input-bar {
    padding: 4px 4px 4px 12px;
    margin: 0 10px 10px;
  }
  #chat-input {
    font-size: 15px;
    min-height: 34px;
  }
  #chat-send-btn {
    width: 40px;
    height: 40px;
  }
  .detail-level-bar {
    bottom: 82px;
  }
  #chat-attachments {
    bottom: 126px;
  }
}

/* ── Side panel ─────────────────────────────────────────────── */
#side-panel {
  position: fixed;
  top: 0;
  left: -290px;
  width: 272px;
  height: 100%;
  background: white;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
  z-index: 200;
  transition: left 0.28s ease;
  display: flex;
  flex-direction: column;
}
#side-panel.open {
  left: 0;
}

#side-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 199;
}

.side-header {
  padding: 18px 14px 12px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
}
.side-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: white;
}

#side-new-chat-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

#side-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
}

.side-date-header {
  padding: 8px 14px 3px;
  font-size: 11px;
  color: var(--gray);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.side-chat-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.12s;
}
.side-chat-item:hover,
.side-chat-item.active {
  background: #f0ffe4;
}
.side-chat-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.side-chat-preview {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-loading,
.side-empty {
  padding: 20px;
  text-align: center;
  color: var(--gray);
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════
   WEATHER  — airy white-blue
══════════════════════════════════════════════════════════════ */
#scene-weather {
  background:
    radial-gradient(
      ellipse 75% 45% at 15% 8%,
      rgba(185, 245, 225, 0.6) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 55% 35% at 85% 88%,
      rgba(190, 230, 255, 0.45) 0%,
      transparent 60%
    ),
    linear-gradient(
      162deg,
      #cce8f7 0%,
      #c4e3f5 20%,
      #d6eff9 45%,
      #e4f5fc 70%,
      #f0faff 100%
    );
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  transition: background 0.15s;
}
.icon-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}
.icon-btn.spinning svg {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.weather-search-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px 6px;
  background: transparent;
  flex-shrink: 0;
}
#weather-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid rgba(100, 160, 210, 0.35);
  border-radius: 24px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.8);
  min-width: 0;
}
#weather-search-input:focus {
  outline: none;
  border-color: #4a9fd5;
}

@media (max-width: 480px) {
  #weather-search-input {
    padding: 7px 12px;
    font-size: 13px;
  }
  .weather-icon-btn {
    width: 34px;
    height: 34px;
  }
  .weather-search-bar {
    gap: 5px;
    padding: 8px 10px 5px;
  }

  .auth-robot-video {
    width: 100px;
    height: 100px;
  }
}

@media (max-height: 800px) {
  .auth-robot-video {
    display: none;
  }
}

.weather-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(100, 160, 210, 0.3);
  color: #3a7ab0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.weather-icon-btn:active {
  background: rgba(74, 159, 213, 0.2);
}

.weather-coord-bar {
  display: flex;
  gap: 8px;
  padding: 6px 14px 10px;
  background: transparent;
  flex-shrink: 0;
}
.coord-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid rgba(100, 160, 210, 0.35);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  color: #1a3a55;
}
.coord-input:focus {
  outline: none;
  border-color: #4a9fd5;
}

#weather-map-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #e8f4fb;
  border-bottom: 1px solid rgba(100, 160, 210, 0.3);
}
#weather-map {
  height: 50vh;
  min-height: 350px;
  max-height: 600px;
  width: 100%;
  z-index: 1;
}
.map-hint {
  font-size: 12px;
  color: #3a7ab0;
  text-align: center;
  padding: 6px 14px;
  opacity: 0.8;
}

.weather-tabs {
  display: flex;
  background: transparent;
  flex-shrink: 0;
}
.weather-tab {
  flex: 1;
  padding: 11px 4px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(40, 90, 130, 0.65);
  text-align: center;
  border-bottom: 3px solid transparent;
  transition: all 0.18s;
}
.weather-tab.active {
  color: #1a5a8a;
  border-bottom-color: #4a9fd5;
  background: rgba(255, 255, 255, 0.4);
}

#weather-status {
  padding: 30px;
  text-align: center;
  color: #4a7a9b;
  font-size: 16px;
}

.weather-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding-top: 155px;
  scrollbar-width: none;
}
.weather-scroll::-webkit-scrollbar {
  display: none;
}

#weather-map-panel,
.weather-tabs,
#weather-status {
  position: relative;
  z-index: 5;
}

.weather-section {
  padding-bottom: 6px;
}
.weather-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #3a6a8a;
  padding: 14px 14px 6px;
  opacity: 0.85;
}

.weather-location {
  text-align: center;
  padding: 14px;
}
.weather-location h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a4060;
}
.weather-location p {
  font-size: 13px;
  color: #5a8aaa;
}
#weather-updated {
  font-size: 11px;
  color: #8aaabb;
  margin-top: 2px;
}

.weather-current-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 20px 18px;
  gap: 2px;
}
#w-icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
#w-weather {
  font-size: 17px;
  color: #4a7a9b;
}
#w-temp {
  font-size: 54px;
  font-weight: 800;
  color: #1a2a3a;
  line-height: 1;
}
#w-feels {
  font-size: 14px;
  color: #5a8aaa;
}

.weather-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}
.weather-detail-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #1a3a55;
}

.ai-analysis-card {
  margin: 0 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.6;
  border-left: 4px solid #4a9fd5;
}

.ai-loading {
  font-style: italic;
  animation: aiPulse 1.6s ease-in-out infinite;
}
@keyframes aiPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.25;
  }
}
@keyframes aiReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ai-revealed {
  animation: aiReveal 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Hourly */
.hourly-scroll {
  overflow-x: auto;
  display: flex;
  gap: 8px;
  padding: 12px 14px 6px;
  scrollbar-width: none;
}
.hourly-scroll::-webkit-scrollbar {
  display: none;
}
.hourly-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 80px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.hourly-card.highlighted {
  background: rgba(74, 159, 213, 0.18);
  border-color: rgba(74, 159, 213, 0.45);
}
.h-time {
  font-size: 12px;
  font-weight: 700;
  color: #4a7a9b;
}
.h-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.h-temp {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a55;
}
.h-rain {
  font-size: 11px;
  color: #2980b9;
}
.h-hum {
  font-size: 11px;
  color: #5a8aaa;
}
.h-bar-wrap {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: flex-end;
  margin-top: 6px;
  position: relative;
}
.h-bar {
  width: 100%;
  min-height: 5px;
  border-radius: 4px 4px 0 0;
  opacity: 0.92;
}

.temp-sparkline {
  display: none;
}

/* Daily — horizontal card (mirrors hourly style) */
.daily-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 90px;
  flex-shrink: 0;
  overflow: hidden;
}
.daily-card.highlighted {
  background: rgba(74, 159, 213, 0.18);
  border-color: rgba(74, 159, 213, 0.45);
}
.d-date {
  font-size: 11px;
  font-weight: 700;
  color: #4a7a9b;
  text-align: center;
}
.d-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.d-max {
  font-weight: 700;
  color: #c0392b;
  font-size: 14px;
}
.d-min {
  color: #2980b9;
  font-size: 12px;
}
.d-precip {
  font-size: 11px;
  color: #2980b9;
}
.d-wind {
  font-size: 11px;
  color: #5a8aaa;
}
.d-uv {
  font-size: 11px;
  color: #f39c12;
}
.wx-extra {
  font-size: 11px;
  color: #5a8aaa;
}
.wx-extra:last-of-type {
  margin-bottom: 4px;
}

/* History day row (vertical list, used by renderHistoryDays) */
.daily-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(180, 210, 240, 0.3);
}

/* History */
.history-form {
  background: white;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #eee;
}
.history-date-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.history-date-row label {
  font-size: 13px;
  font-weight: 600;
  width: 32px;
  flex-shrink: 0;
  color: var(--gray);
}
.date-input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}
.date-input:focus {
  outline: none;
  border-color: var(--accent);
}
.history-btns {
  display: flex;
  gap: 10px;
}
.history-btn {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: linear-gradient(130deg, var(--green-dark), var(--green-mid));
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.history-btn-alt {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: #f0f0f0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

#weather-history-ai {
  padding: 12px 14px;
  background: #f4ffe8;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px solid #d8f0b8;
}
#weather-history-status {
  padding: 14px;
  text-align: center;
  color: var(--gray);
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════
   FIELDS
══════════════════════════════════════════════════════════════ */
#scene-fields {
  background: linear-gradient(
    0deg,
    rgba(232, 234, 235, 1) 0%,
    rgba(235, 235, 235, 1) 15%,
    rgba(193, 237, 166, 1) 50%,
    rgba(230, 227, 227, 1) 85%,
    rgba(232, 232, 232, 1) 100%
  );
}

/* .fields-header — no longer needed, .screen-header is transparent */

.fields-controls {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  flex-shrink: 0;
  align-items: center;
}
.fields-sort-label {
  font-size: 13px;
  color: var(--gray);
  white-space: nowrap;
  flex-shrink: 0;
}
#fields-sort {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  background: white;
}
#fields-sort:focus {
  outline: none;
  border-color: var(--accent);
}
#fields-refresh-btn {
  padding: 7px 10px;
  border-radius: 8px;
}

#fields-meta {
  padding: 10px 14px;
  background: rgba(190, 225, 129, 0.55);
  border-bottom: 1px solid rgba(130, 185, 50, 0.25);
  flex-shrink: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
#fields-ai {
  font-size: 13px;
  color: var(--gray);
  flex-basis: 100%;
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#fields-status {
  padding: 20px;
  text-align: center;
  color: var(--gray);
}
.fields-empty {
  padding: 20px;
  text-align: center;
  color: var(--gray);
}

#fields-meta {
  display: none !important;
}

.fields-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 115px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.fields-meta-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.fields-ai-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
  white-space: pre-line;
}
.fields-scroll::-webkit-scrollbar {
  display: none;
}

#fields-meta,
#fields-status {
  position: relative;
  z-index: 5;
}

.field-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
.field-card:active {
  transform: scale(0.98);
}
.field-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.field-name {
  font-size: 15px;
  font-weight: 700;
}
.field-ndvi {
  font-size: 12px;
  font-weight: 700;
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
}
.field-card-body {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--gray);
  flex-wrap: wrap;
}

/* Field detail full-screen */
#field-detail-panel {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.3s ease;
}
#field-detail-panel.panel-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.field-detail-header {
  background: linear-gradient(130deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 18px 16px;
  flex-shrink: 0;
}
.field-detail-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.field-detail-meta {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 14px;
  opacity: 0.9;
}

.field-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.field-detail-scroll::-webkit-scrollbar {
  display: none;
}

.fd-section {
  background: #f6f6f6;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.fd-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 9px;
  letter-spacing: 0.5px;
}
.fd-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid #ebebeb;
}
.fd-row:last-child {
  border-bottom: none;
}
.fd-label {
  color: var(--gray);
}
.fd-value {
  font-weight: 600;
}
.fd-ai {
  background: #f0ffe4;
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  font-size: 14px;
  line-height: 1.7;
  border-left: 4px solid var(--accent);
  white-space: pre-line;
  word-break: break-word;
}
#field-detail-close {
  margin: 12px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: #f0f0f0;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   PRICES
══════════════════════════════════════════════════════════════ */
#scene-prices {
  background: linear-gradient(
    0deg,
    rgba(232, 234, 235, 1) 0%,
    rgba(235, 235, 235, 1) 15%,
    rgba(193, 237, 166, 1) 50%,
    rgba(230, 227, 227, 1) 85%,
    rgba(232, 232, 232, 1) 100%
  );
}

.prices-controls {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  flex-shrink: 0;
  align-items: center;
}
#prices-crop-select {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #ccc;
  border-radius: 20px;
  font-size: 15px;
  background: white;
}
#prices-crop-select:focus {
  outline: none;
  border-color: var(--accent);
}
#prices-refresh-btn {
  padding: 7px 10px;
  border-radius: 8px;
}

#prices-updated {
  padding: 5px 14px;
  font-size: 12px;
  color: var(--gray);
  flex-shrink: 0;
}
#prices-status {
  padding: 20px;
  text-align: center;
  color: var(--gray);
}

.prices-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 145px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}
.prices-scroll::-webkit-scrollbar {
  display: none;
}

#prices-updated,
#prices-status {
  position: relative;
  z-index: 5;
}

.price-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}
.price-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.price-company {
  font-size: 15px;
  font-weight: 700;
}
.price-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.price-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--gray);
}

/* ══════════════════════════════════════════════════════════════
   PROFILE
══════════════════════════════════════════════════════════════ */
#scene-profile {
  background: linear-gradient(
    0deg,
    rgba(232, 234, 235, 1) 0%,
    rgba(235, 235, 235, 1) 15%,
    rgba(193, 237, 166, 1) 50%,
    rgba(230, 227, 227, 1) 85%,
    rgba(232, 232, 232, 1) 100%
  );
}

/* .profile-header — no longer needed, .screen-header is transparent */

.profile-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
.profile-scroll::-webkit-scrollbar {
  width: 6px;
}
.profile-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.profile-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.profile-usage-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
#profile-usage-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0%, #e8e8e8 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
#profile-usage-circle::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  background: white;
  border-radius: 50%;
}

.profile-usage-text {
  flex: 1;
}
#profile-usage-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
#profile-expires {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

.profile-usage-bar {
  height: 7px;
  background: #e8e8e8;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
#profile-usage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green-light));
  border-radius: 4px;
  transition: width 0.5s;
}

.profile-section {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.profile-section-title {
  padding: 10px 18px 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
}
.profile-row:last-child {
  border-bottom: none;
}
.profile-row-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.profile-row-text {
  flex: 1;
  font-size: 15px;
}
.profile-row-sub {
  font-size: 12px;
  color: var(--gray);
  margin-top: 1px;
}

#profile-support-btn {
  text-align: left;
  font-size: 15px;
  color: var(--text);
  flex: 1;
}
#profile-logout-btn {
  background: #e74c3c;
  color: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  transition: opacity 0.15s;
  margin-top: auto;
  flex-shrink: 0;
}
#profile-logout-btn:active {
  opacity: 0.85;
}

.profile-row .cs-wrap {
  flex: 1;
}

/* Arrow image flipped horizontally (used for right-side back/close buttons) */
.arrow-flip {
  transform: scaleX(-1);
}

/* ══════════════════════════════════════════════════════════════
   BOT MESSAGE WRAPPER + ACTION BUTTONS
══════════════════════════════════════════════════════════════ */
.bot-msg-wrap {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 80%;
}
.bot-msg-wrap .chat-bubble {
  align-self: unset;
  max-width: 100%;
}
.bot-actions {
  display: flex;
  gap: 6px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.bot-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: background 0.12s;
  font-family: inherit;
}
.bot-action-btn:hover {
  background: rgba(123, 181, 14, 0.12);
}
.bot-action-btn:active {
  background: rgba(123, 181, 14, 0.25);
}
.bot-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.bot-action-btn.playing {
  color: var(--accent);
  background: rgba(123, 181, 14, 0.12);
  border-color: rgba(123, 181, 14, 0.35);
}

/* ══════════════════════════════════════════════════════════════
   MODALS (bottom sheet style)
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 600;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
.modal-sheet {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 40px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modalSlideUp 0.22s ease;
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes modalSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.modal-text {
  font-size: 15px;
  color: var(--gray);
  text-align: center;
  line-height: 1.5;
}
.modal-close-btn {
  padding: 13px;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #f0f0f0;
  font-size: 15px;
  font-weight: 700;
}

/* Support email */
.support-email-btn {
  display: block;
  text-align: center;
  padding: 16px;
  background: linear-gradient(130deg, var(--green-dark), var(--green-mid));
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

/* Presentation panel */
.present-textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 14px;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}
.present-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.present-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.present-controls label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
}
.present-num {
  width: 64px;
  padding: 8px;
  text-align: center;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.present-select {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.present-btn-primary {
  padding: 14px;
  width: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(130deg, var(--green-dark), var(--green-mid));
  color: white;
  font-size: 15px;
  font-weight: 700;
  transition: opacity 0.15s;
}
.present-btn-primary:disabled {
  opacity: 0.6;
}
.present-btn-secondary {
  padding: 13px;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #f0f0f0;
  font-size: 15px;
  font-weight: 700;
}
.present-status {
  text-align: center;
  font-size: 14px;
  color: var(--gray);
  min-height: 18px;
}

/* ══════════════════════════════════════════════════════════════
   WEATHER HISTORY CARDS (horizontal scroll, mirrors hourly)
══════════════════════════════════════════════════════════════ */
.history-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 110px;
  flex-shrink: 0;
}
.history-btn-secondary {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: #f0f0f0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .weather-tabs {
    display: none;
  }
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}
.map-hint {
  flex: 1;
  font-size: 12px;
  color: #4a7a9b;
  opacity: 0.8;
  margin: 0;
}
.map-confirm-btn {
  padding: 9px 20px;
  border-radius: 20px;
  background: linear-gradient(130deg, var(--green-dark), var(--green-mid));
  color: white;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */

/* Scene entrance — slide up + fade */
@keyframes sceneSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.scene-enter {
  animation: sceneSlideUp 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Card entrance — staggered slide up */
@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fields-meta-card {
  animation: cardSlideUp 0.28s ease both;
}
.fields-ai-card {
  animation: cardSlideUp 0.28s ease both;
  animation-delay: 0.05s;
}
.field-card {
  animation: cardSlideUp 0.28s ease both;
}
.field-card:nth-child(3) {
  animation-delay: 0.07s;
}
.field-card:nth-child(4) {
  animation-delay: 0.11s;
}
.field-card:nth-child(5) {
  animation-delay: 0.15s;
}
.field-card:nth-child(6) {
  animation-delay: 0.19s;
}
.field-card:nth-child(7) {
  animation-delay: 0.22s;
}
.field-card:nth-child(8) {
  animation-delay: 0.25s;
}
.field-card:nth-child(9) {
  animation-delay: 0.28s;
}
.field-card:nth-child(10) {
  animation-delay: 0.3s;
}
.field-card:nth-child(n + 11) {
  animation-delay: 0.32s;
}

.price-card {
  animation: cardSlideUp 0.28s ease both;
}
.price-card:nth-child(2) {
  animation-delay: 0.05s;
}
.price-card:nth-child(3) {
  animation-delay: 0.09s;
}
.price-card:nth-child(4) {
  animation-delay: 0.13s;
}
.price-card:nth-child(5) {
  animation-delay: 0.17s;
}
.price-card:nth-child(6) {
  animation-delay: 0.2s;
}
.price-card:nth-child(7) {
  animation-delay: 0.23s;
}
.price-card:nth-child(8) {
  animation-delay: 0.26s;
}
.price-card:nth-child(n + 9) {
  animation-delay: 0.28s;
}

/* Chat bubble entrance */
@keyframes bubbleUser {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
@keyframes bubbleBot {
  from {
    opacity: 0;
    transform: translateX(-18px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.user-bubble {
  animation: bubbleUser 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.bot-msg-wrap {
  animation: bubbleBot 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.bot-bubble:not(.loading-bubble) {
  animation: bubbleBot 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ARNI widget breathing when idle */
@keyframes arniBreath {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  }
  50% {
    box-shadow:
      0 6px 26px rgba(90, 167, 40, 0.3),
      0 4px 16px rgba(0, 0, 0, 0.12);
  }
}
#arni-widget:not(.speaking) {
  animation: arniBreath 3.5s ease-in-out infinite;
}

/* Menu items stagger (built dynamically) */
@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.menu-btn {
  animation: menuItemIn 0.35s cubic-bezier(0.34, 1.25, 0.64, 1) both;
}
.menu-btn:nth-child(2) {
  animation-delay: 0.04s;
}
.menu-btn:nth-child(3) {
  animation-delay: 0.07s;
}
.menu-btn:nth-child(4) {
  animation-delay: 0.1s;
}
.menu-btn:nth-child(5) {
  animation-delay: 0.13s;
}
.menu-btn:nth-child(6) {
  animation-delay: 0.16s;
}
.menu-btn:nth-child(7) {
  animation-delay: 0.19s;
}
.menu-btn:nth-child(8) {
  animation-delay: 0.21s;
}
.menu-btn:nth-child(n + 9) {
  animation-delay: 0.24s;
}

/* Weather tab panes fade */
@keyframes paneFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.weather-section {
  animation: paneFadeIn 0.28s ease both;
}

/* Weather map panel reveal */
@keyframes mapReveal {
  from {
    opacity: 0;
    transform: scaleY(0.5);
    transform-origin: top;
  }
  to {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}
#weather-map-panel:not(.hidden) {
  animation: mapReveal 0.38s cubic-bezier(0.34, 1.1, 0.64, 1) both;
}

/* ══════════════════════════════════════════════════════════════
   CUSTOM SELECT DROPDOWN
══════════════════════════════════════════════════════════════ */
.cs-wrap {
  position: relative;
  flex: 1;
}
.cs-trigger {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  color: var(--text);
}
.cs-trigger:focus {
  outline: none;
}
.cs-wrap.open .cs-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 181, 14, 0.15);
}
.cs-value {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-arrow {
  flex-shrink: 0;
  color: #888;
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.cs-wrap.open .cs-arrow {
  transform: rotate(180deg);
}

.cs-panel {
  position: fixed;
  background: white;
  border-radius: 16px;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-height: 50vh;
  max-height: 50dvh;
  z-index: 9999;
  transform-origin: top center;
  transform: scaleY(0.82) translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.26s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.18s ease;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.cs-search-input {
  padding: 10px 12px !important;
  font-size: 14px !important;
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  width: 100% !important;
  font-family: inherit !important;
  flex-shrink: 0;
}
.cs-search-input::placeholder {
  color: #999;
}
.cs-search-input:focus {
  outline: none;
  background: #f9f9f9;
}
.cs-options-container {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}
/* Scrollbar для контейнера опций */
.cs-options-container::-webkit-scrollbar {
  width: 6px;
}
.cs-options-container::-webkit-scrollbar-track {
  background: transparent;
}
.cs-options-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}
.cs-options-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}
.cs-panel.open {
  transform: scaleY(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.cs-option {
  padding: 11px 16px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s;
  border-bottom: 1px solid #f4f4f4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.cs-option:last-child {
  border-bottom: none;
}
.cs-option:hover {
  background: #f4ffe8;
}
.cs-option.active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(123, 181, 14, 0.07);
}
.cs-no-match {
  padding: 12px 16px;
  color: #999;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
}
