﻿* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
    }

    body {
      min-height: 100vh;
      background: linear-gradient(135deg, #d8f3dc, #95d5b2);
      color: #1b4332;
      padding: 24px;
    }

    .container {
      max-width: 1320px;
      margin: 0 auto;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
      gap: 16px;
      flex-wrap: wrap;
    }

    h1 {
      font-size: 2rem;
    }

    .status {
      background: #ffffffcc;
      padding: 10px 16px;
      border-radius: 999px;
      font-weight: bold;
      color: #1b4332;
      text-decoration: none;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .status:hover {
      text-decoration: underline;
    }

    .grid {
      display: flex;
      align-items: flex-start;
      gap: 24px;
    }

    .card {
      background: #ffffffdd;
      border-radius: 20px;
      padding: 20px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .grid > * {
      align-self: flex-start;
    }

    .camera-card {
      flex: 1 1 760px;
      min-width: 0;
      align-self: flex-start;
    }

    .camera-box {
      width: 100%;
      aspect-ratio: 16 / 9;
      background: #081c15;
      border-radius: 16px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      margin-top: 16px;
    }

    .camera-box img,
    .camera-box iframe {
      width: 100%;
      height: 100%;
      border: none;
      object-fit: cover;
    }

    .camera-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .camera-current {
      font-size: 0.92rem;
      font-weight: bold;
      color: #2d6a4f;
      background: #f8fff9;
      border-radius: 999px;
      padding: 7px 12px;
      box-shadow: inset 0 0 0 1px #c7e9d0;
    }

    .camera-switcher {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
      margin-top: 12px;
    }

    .camera-choice {
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: center;
      gap: 10px;
      min-height: 48px;
      padding: 10px 12px;
      border-radius: 14px;
      border: 1px solid #c7e9d0;
      background: #f8fff9;
      color: #1b4332;
      font-size: 0.9rem;
      font-weight: bold;
      text-align: left;
      box-shadow: none;
    }

    .camera-choice:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .camera-choice.active {
      border-color: #2d6a4f;
      background: #d8f3dc;
      color: #081c15;
    }

    .camera-dot {
      width: 11px;
      height: 11px;
      border-radius: 999px;
      background: #74c69d;
      box-shadow: 0 0 0 4px #d8f3dc;
    }

    .camera-choice.active .camera-dot {
      background: #1b4332;
    }

    .controls {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      align-self: start;
      align-content: start;
    }

    .side-stack {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
      flex: 0 0 320px;
      align-self: flex-start;
    }

    button {
      border: none;
      border-radius: 16px;
      padding: 14px 16px;
      min-height: 58px;
      font-size: 1rem;
      font-weight: bold;
      cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    }

    button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    }

    .btn-light {
      background: #ffd166;
      color: #4a3200;
    }

    .btn-water {
      background: #48cae4;
      color: #023047;
    }

    .btn-off {
      background: #ced4da;
      color: #343a40;
    }

    .timelapse-preview {
      display: grid;
      gap: 12px;
      align-content: start;
    }

    .daily-summary {
      display: grid;
      gap: 12px;
      align-content: start;
      margin-top: 16px;
      padding: 14px;
      border-radius: 14px;
      background: #f8fff9;
      box-shadow: inset 0 0 0 1px #c7e9d0;
    }

    .summary-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .summary-status {
      border-radius: 999px;
      padding: 6px 10px;
      background: #d8f3dc;
      color: #1b4332;
      font-size: 0.78rem;
      font-weight: bold;
      box-shadow: inset 0 0 0 1px #95d5b2;
    }

    .summary-text {
      line-height: 1.45;
      color: #1b4332;
    }

    .summary-list-block {
      display: grid;
      gap: 6px;
    }

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

    .summary-list-block h3 {
      font-size: 0.9rem;
      color: #2d6a4f;
    }

    .summary-list-block ul {
      display: grid;
      gap: 6px;
      padding-left: 18px;
    }

    .summary-list-block li {
      line-height: 1.35;
    }

    .summary-time {
      color: #2d6a4f;
      opacity: 0.8;
    }

    .timelapse-box {
      width: 100%;
      aspect-ratio: 16 / 9;
      background: #f8fff9;
      border-radius: 16px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #1b4332;
      box-shadow: inset 0 0 0 1px #c7e9d0;
    }

    .timelapse-box video {
      width: 100%;
      height: 100%;
      border: none;
      object-fit: contain;
      background: #f8fff9;
    }

    .timelapse-button {
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      padding: 14px 16px;
      min-height: 58px;
      background: #ffd166;
      color: #4a3200;
      text-decoration: none;
      font-size: 1rem;
      font-weight: bold;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    }

    .timelapse-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    }

    .sensors {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      margin-top: 20px;
    }

    .sensor {
      background: #f8fff9;
      padding: 10px;
      border-radius: 18px;
      text-align: center;
      box-shadow: inset 0 0 0 1px #c7e9d0;
    }

    .sensor .label {
      font-size: 0.78rem;
      opacity: 0.75;
      margin-bottom: 6px;
      line-height: 1.2;
    }

    .sensor .value {
      font-size: 1.25rem;
      font-weight: bold;
    }

    .log {
      display: none;
      margin-top: 16px;
      max-height: 95px;
      overflow-y: auto;
      background: #081c15;
      color: #d8f3dc;
      border-radius: 14px;
      padding: 10px;
      font-family: monospace;
      font-size: 0.82rem;
    }

    .log.visible {
      display: block;
    }

    .log p {
      margin-bottom: 6px;
    }

    @media (max-width: 1050px) {
      .grid {
        flex-direction: column;
      }

      .camera-card,
      .side-stack {
        width: 100%;
      }

      .sensors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .summary-columns {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 520px) {
      .sensors {
        grid-template-columns: 1fr;
      }
    }

