:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #eef2f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef2f4;
}

button,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 10px;
  margin: 0;
}

.context-grid div {
  min-width: 0;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d7dee2;
  border-radius: 8px;
}

dt {
  color: #5b6770;
  font-size: 0.78rem;
}

dd {
  margin: 3px 0 0;
  font-weight: 700;
  color: #111827;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.map-panel,
.assistant-panel {
  background: #ffffff;
  border: 1px solid #d7dee2;
  border-radius: 8px;
  padding: 18px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-heading span {
  color: #64727c;
  font-size: 0.86rem;
}

.map-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  background: #f7f9fa;
  border: 1px solid #d7dee2;
  border-radius: 8px;
}

.map-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: contain;
}

.map-placeholder {
  display: grid;
  gap: 8px;
  text-align: center;
  color: #52616b;
  padding: 24px;
}

.map-placeholder strong {
  color: #1f2933;
}

.question-form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 12px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #b8c2c8;
  border-radius: 8px;
}

textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: #0f766e;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.quick-question {
  color: #0f4f4a;
  background: #dcefed;
}

#submitButton {
  color: #ffffff;
  background: #0f766e;
}

.answer-section {
  margin-top: 22px;
}

.answer-box {
  min-height: 220px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.7;
  color: #1f2933;
  background: #f7f9fa;
  border: 1px solid #d7dee2;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 28px, 720px);
    padding: 24px 0;
  }

  .page-header {
    display: grid;
    align-items: start;
  }

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

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

  .map-frame {
    min-height: 360px;
  }
}
