:root {
  --bg: #04070d;
  --bg-panel: rgba(10, 16, 29, 0.78);
  --bg-panel-strong: rgba(12, 20, 38, 0.95);
  --line: rgba(93, 135, 215, 0.18);
  --line-strong: rgba(93, 135, 215, 0.38);
  --text: #eef5ff;
  --text-soft: #9fb3d2;
  --text-dim: #64789b;
  --cyan: #00e5ff;
  --blue: #4f8fff;
  --green: #00ff9d;
  --orange: #ff9a3c;
  --red: #ff5c7a;
  --yellow: #ffe066;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
  --glow: 0 0 36px rgba(79, 143, 255, 0.16);
  --font-main: 'Noto Sans SC', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 229, 255, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(79, 143, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #09111f 0%, #04070d 52%, #04070d 100%);
  overflow-x: hidden;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px 26px;
  border-radius: 28px;
  background: rgba(8, 13, 24, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  backdrop-filter: blur(18px);
}

.header-left {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(79, 143, 255, 0.85));
  box-shadow: 0 0 30px rgba(79, 143, 255, 0.28);
}

.header-title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
}

.header-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.header-right {
  display: flex;
  gap: 18px;
  align-items: center;
}

.live-badge,
.date-chip,
.status-chip,
.impact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.live-badge {
  background: rgba(0, 255, 157, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 255, 157, 0.22);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}

.clock-stack {
  text-align: right;
}

.header-time {
  font-family: var(--font-mono);
  font-size: 30px;
  color: var(--cyan);
  letter-spacing: 1px;
}

.header-date {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.page-notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 26, 48, 0.8);
  color: var(--text);
  line-height: 1.6;
}

.page-notice.success {
  border-color: rgba(0, 255, 157, 0.26);
  background: rgba(0, 255, 157, 0.09);
}

.page-notice.warning {
  border-color: rgba(255, 154, 60, 0.28);
  background: rgba(255, 154, 60, 0.1);
}

.page-notice.error {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 92, 122, 0.1);
}

.main-grid {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card:hover {
  border-color: var(--line-strong);
}

.card-score {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.card-forecast {
  grid-column: 2;
  grid-row: 1;
}

.card-weather {
  grid-column: 3;
  grid-row: 1;
}

.card-trend {
  grid-column: 2 / span 2;
  grid-row: 2;
}

.card-signals {
  grid-column: 1;
  grid-row: 3;
}

.card-consumption {
  grid-column: 1;
  grid-row: 4;
}

.card-advice {
  grid-column: 2;
  grid-row: 3;
}

.card-indicators {
  grid-column: 3;
  grid-row: 3;
}

.card-correlation {
  grid-column: 2 / span 2;
  grid-row: 4;
  align-self: start;
}

.card-label {
  margin: 0 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.card-label::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.secondary-btn,
.primary-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-color: var(--line);
}

.secondary-btn:hover:not(:disabled) {
  border-color: rgba(0, 229, 255, 0.28);
  color: var(--text);
}

.primary-btn {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(79, 143, 255, 0.9));
  color: #04101c;
  box-shadow: 0 10px 30px rgba(79, 143, 255, 0.22);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.score-ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 6px auto 18px;
}

.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fill {
  fill: none;
  stroke-width: 14;
}

.ring-bg {
  stroke: rgba(79, 143, 255, 0.12);
}

.ring-fill {
  stroke: url(#scoreGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s ease;
}

.score-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 58px;
  color: var(--text);
}

.score-copy {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 14px;
}

.score-status {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 16px;
}

.score-factors,
.signals-list,
.advice-list,
.tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.factor-row,
.signal-item,
.summary-card,
.detail-item,
.indicator-item,
.advice-item,
.context-panel {
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.factor-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.factor-value {
  font-family: var(--font-mono);
  color: var(--cyan);
}

.forecast-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ai-status-banner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.ai-status-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ai-status-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 0 rgba(100, 120, 155, 0.3);
}

.ai-status-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.ai-status-desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
}

.ai-status-banner.loading {
  border-color: rgba(255, 224, 102, 0.22);
  background: rgba(255, 224, 102, 0.07);
}

.ai-status-banner.loading .ai-status-dot {
  background: var(--yellow);
  animation: pulse-ring 1.2s ease-in-out infinite;
}

.ai-status-banner.success {
  border-color: rgba(0, 255, 157, 0.22);
  background: rgba(0, 255, 157, 0.08);
}

.ai-status-banner.success .ai-status-dot {
  background: var(--green);
}

.ai-status-banner.error {
  border-color: rgba(255, 92, 122, 0.24);
  background: rgba(255, 92, 122, 0.08);
}

.ai-status-banner.error .ai-status-dot {
  background: var(--red);
}

.ai-status-banner.fallback {
  border-color: rgba(255, 154, 60, 0.24);
  background: rgba(255, 154, 60, 0.08);
}

.ai-status-banner.fallback .ai-status-dot {
  background: var(--orange);
}

.ai-retry-btn {
  white-space: nowrap;
}

.forecast-caption,
.summary-label,
.detail-label,
.context-meta,
.indicator-name,
.tag-section-title,
.signal-meta {
  color: var(--text-dim);
  font-size: 12px;
}

.forecast-value {
  margin-top: 8px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: 1px;
}

.forecast-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.status-chip {
  background: rgba(79, 143, 255, 0.1);
  color: var(--blue);
  border: 1px solid rgba(79, 143, 255, 0.22);
}

.status-chip.success {
  background: rgba(0, 255, 157, 0.1);
  color: var(--green);
  border-color: rgba(0, 255, 157, 0.22);
}

.status-chip.danger {
  background: rgba(255, 92, 122, 0.1);
  color: var(--red);
  border-color: rgba(255, 92, 122, 0.22);
}

.status-chip.muted,
.date-chip,
.tag.muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.summary-grid,
.weather-detail,
.indicators-grid {
  display: grid;
  gap: 12px;
}

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

.summary-card {
  padding: 14px;
}

.summary-value,
.detail-value,
.indicator-value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text);
}

.summary-value.small {
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
}

.forecast-rationale {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.06), rgba(79, 143, 255, 0.04));
  border: 1px solid rgba(0, 229, 255, 0.12);
}

.forecast-rationale-title,
.context-title {
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.forecast-rationale p,
.context-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 14px;
}

.forecast-rationale.loading p {
  display: none;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton-line.w-100 {
  width: 100%;
}

.skeleton-line.w-92 {
  width: 92%;
}

.skeleton-line.w-88 {
  width: 88%;
}

.skeleton-line.w-84 {
  width: 84%;
}

.skeleton-line.w-72 {
  width: 72%;
}

.forecast-skeleton .forecast-value,
.forecast-skeleton .summary-value,
.forecast-skeleton .summary-value.small,
.forecast-skeleton .star-row {
  color: transparent;
  border-radius: 10px;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}

.forecast-skeleton .forecast-value {
  min-height: 56px;
  min-width: 220px;
}

.forecast-skeleton .summary-value,
.forecast-skeleton .summary-value.small {
  min-height: 28px;
}

.forecast-skeleton .star-row {
  min-height: 28px;
  min-width: 96px;
  display: inline-block;
}

.advice-skeleton {
  margin-top: 2px;
}

.meta-line {
  margin-top: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 12px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.weather-icon {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.12);
  font-size: 28px;
  font-weight: 700;
  color: var(--cyan);
}

.weather-temp {
  font-size: 34px;
  font-family: var(--font-mono);
}

.weather-desc {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 14px;
}

.weather-detail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.detail-item,
.indicator-item {
  padding: 14px;
}

.context-panel {
  padding: 16px;
}

.context-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.trend-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(79, 143, 255, 0.18);
  border-color: rgba(79, 143, 255, 0.42);
  color: var(--text);
}

.chart-wrap {
  height: 280px;
}

.signal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
}

.signal-text {
  min-width: 0;
}

.signal-title {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.impact-pill {
  min-width: 56px;
  justify-content: center;
}

.impact-pill.positive {
  color: var(--green);
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.impact-pill.negative {
  color: var(--red);
  background: rgba(255, 92, 122, 0.1);
  border: 1px solid rgba(255, 92, 122, 0.2);
}

.impact-pill.neutral {
  color: var(--yellow);
  background: rgba(255, 224, 102, 0.1);
  border: 1px solid rgba(255, 224, 102, 0.2);
}

.input-group,
.dual-field,
.field-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

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

.input-group label,
.field-stack label {
  color: var(--text-soft);
  font-size: 13px;
}

.input-control {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: 0.2s ease;
}

.input-control:focus {
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08);
}

.input-textarea {
  resize: vertical;
  min-height: 92px;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.button-row>* {
  flex: 1;
}

.button-row.compact {
  margin-top: 12px;
}

.import-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.import-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.import-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.import-link {
  color: var(--cyan);
  font-size: 12px;
  text-decoration: none;
}

.import-link:hover {
  text-decoration: underline;
}

.import-help {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.import-btn {
  width: 100%;
  margin-top: 12px;
}

.import-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 12px;
  white-space: pre-line;
}

.import-result.success {
  border-color: rgba(0, 255, 157, 0.22);
  background: rgba(0, 255, 157, 0.08);
}

.import-result.warning {
  border-color: rgba(255, 154, 60, 0.22);
  background: rgba(255, 154, 60, 0.08);
}

.import-result.error {
  border-color: rgba(255, 92, 122, 0.22);
  background: rgba(255, 92, 122, 0.08);
}

.import-result.loading {
  border-color: rgba(255, 224, 102, 0.22);
  background: rgba(255, 224, 102, 0.08);
}

.draft-toolbar,
.correlation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.draft-toolbar {
  margin-top: 14px;
}

.draft-toolbar-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.small-btn {
  padding: 8px 12px;
  font-size: 12px;
}

.keyword-draft-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.keyword-draft-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.advice-item {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.advice-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101c;
  font-family: var(--font-mono);
  font-weight: 700;
}

.advice-copy {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.advice-rating {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 224, 102, 0.08);
  border: 1px solid rgba(255, 224, 102, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-soft);
}

.star-row {
  color: var(--yellow);
  letter-spacing: 2px;
  font-size: 22px;
}

.tag-section {
  margin-bottom: 18px;
}

.tag-list {
  flex-direction: row;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.14);
  color: var(--text);
  font-size: 12px;
}

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

.indicator-value.small {
  font-size: 16px;
}

.correlation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.correlation-summary-item {
  background: rgba(255, 255, 255, 0.03);
}

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

.correlation-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.04), rgba(79, 143, 255, 0.03));
}

.correlation-keyword {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.correlation-meta {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.correlation-meter {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.correlation-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 224, 102, 0.7);
}

.correlation-meter-fill.positive {
  background: linear-gradient(90deg, rgba(0, 255, 157, 0.65), rgba(0, 229, 255, 0.85));
}

.correlation-meter-fill.negative {
  background: linear-gradient(90deg, rgba(255, 92, 122, 0.82), rgba(255, 154, 60, 0.7));
}

.correlation-meter-fill.neutral {
  background: linear-gradient(90deg, rgba(255, 224, 102, 0.6), rgba(79, 143, 255, 0.7));
}

.correlation-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.correlation-stat {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.empty-block {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--line);
  color: var(--text-soft);
  line-height: 1.6;
}

.button-loading {
  position: relative;
}

.button-loading::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  margin-left: 8px;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

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

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@keyframes pulse-ring {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 224, 102, 0.32);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 224, 102, 0);
  }
}

@media (max-width: 1280px) {
  .main-grid {
    grid-template-columns: 320px 1fr;
  }

  .card-weather {
    grid-column: 2;
    grid-row: 2;
  }

  .card-trend {
    grid-column: 1 / span 2;
    grid-row: 3;
  }

  .card-signals {
    grid-column: 1;
    grid-row: 4;
  }

  .card-consumption {
    grid-column: 1;
    grid-row: 5;
  }

  .card-advice {
    grid-column: 2;
    grid-row: 4;
  }

  .card-indicators {
    grid-column: 2;
    grid-row: 5;
  }

  .card-correlation {
    grid-column: 1 / span 2;
    grid-row: 6;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 16px 16px 36px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

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

  .card-score,
  .card-forecast,
  .card-weather,
  .card-trend,
  .card-signals,
  .card-consumption,
  .card-advice,
  .card-indicators,
  .card-correlation {
    grid-column: 1;
    grid-row: auto;
  }

  .summary-grid,
  .indicators-grid,
  .correlation-summary,
  .correlation-list,
  .correlation-stats,
  .weather-detail {
    grid-template-columns: 1fr;
  }

  .forecast-hero,
  .card-head,
  .button-row,
  .ai-status-banner,
  .import-head,
  .draft-toolbar,
  .correlation-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .dual-field,
  .keyword-draft-row {
    grid-template-columns: 1fr;
  }

  .forecast-meta {
    align-items: flex-start;
  }

  .trend-tabs {
    flex-wrap: wrap;
  }
}