* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #f3fbf6;
  color: #073f2d;
  line-height: 1.7;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 7%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 24px rgba(0,80,50,.08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #064b35;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00a86b, #78d98b);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  color: #6a8178;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: #355f53;
  text-decoration: none;
  font-weight: 800;
}

.hero {
  padding: 90px 7% 60px;
  background:
    linear-gradient(115deg, rgba(246,255,249,.96), rgba(225,247,238,.76)),
    radial-gradient(circle at 85% 15%, rgba(0,168,107,.18), transparent 30%);
}

.eyebrow {
  display: inline-block;
  color: #00a86b;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  color: #053b2a;
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero p {
  max-width: 880px;
  font-size: 1.15rem;
  color: #49695f;
}

.section {
  padding: 72px 7%;
}

.query-card,
.chart-card,
.analysis-card,
.guide {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,120,80,.12);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 12px 32px rgba(0,80,50,.08);
}

.query-card {
  max-width: 900px;
  display: grid;
  gap: 14px;
}

label {
  font-weight: 900;
  color: #064b35;
}

input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(0,120,80,.2);
  border-radius: 16px;
  font-size: 1rem;
}

.period-row,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.period-btn,
button {
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #007e55, #00b878);
  color: white;
}

.period-btn {
  background: #e8f2ee;
  color: #14532d;
}

.period-btn.active {
  background: #10b981;
  color: white;
}

.clear-btn {
  background: #eef3ef;
  color: #064b35;
  border: 1px solid rgba(0,120,80,.16);
}

.status {
  margin: 22px 0;
  color: #064b35;
  font-weight: 900;
}

.result-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: start;
}

.chart-card {
  height: 430px;
}

.chart-card h2,
.analysis-card h2,
.guide h2 {
  margin-bottom: 16px;
  color: #064b35;
}

#marketChart {
  width: 100% !important;
  height: 310px !important;
}

.analysis-card ul {
  padding-left: 24px;
  margin: 14px 0;
}

.analysis-card p {
  margin-bottom: 12px;
}

.footer {
  text-align: center;
  padding: 32px 7%;
  background: #053b2a;
  color: white;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .result-layout {
    grid-template-columns: 1fr;
  }

  .chart-card {
    height: 390px;
  }
}

/* AI市場分析師 v1.1 四大模組 */

.module-grid {
  display: grid;
  gap: 18px;
}

.analysis-module {
  background: #f3fbf6;
  border: 1px solid rgba(0,120,80,.12);
  border-radius: 20px;
  padding: 18px;
}

.analysis-module h3 {
  color: #064b35;
  margin-bottom: 10px;
}

.analysis-module ul {
  padding-left: 22px;
  margin: 10px 0;
}

.risk-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e7f8ef;
  color: #057a4f;
  font-weight: 900;
}

select {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(0,120,80,.2);
  border-radius: 16px;
  font-size: 1rem;
  background: white;
  color: #073f2d;
}

.climate-alert-box{
  margin-top:16px;
  padding:16px;
  border-radius:16px;
  background:#fff7ed;
  border:1px solid rgba(255,123,0,.25);
}

.climate-alert-box h4{
  margin:0 0 10px;
  color:#9a3412;
}

.weather-links{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}

.weather-link-btn{
  display:block;
  text-align:center;
  padding:12px;
  border-radius:12px;
  background:#0ea66c;
  color:#fff;
  text-decoration:none;
  font-weight:700;
}

.weather-link-btn:hover{
  opacity:.9;
}

.typhoon-btn{
  background:#f97316;
}