/* WARDEN-ATD: โครงสร้าง สี และ responsive layout */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; }
body { margin: 0; background: #f5f6f2; color: #24342c; font-family: Tahoma, Arial, sans-serif; line-height: 1.7; }
header { padding: 22px 6%; border-bottom: 1px solid #dce2d9; }
header strong { font-size: 18px; }
main { max-width: 1250px; margin: auto; padding: 42px 28px; }
h1 { font-size: clamp(26px,4vw,42px); line-height: 1.35; margin: 8px 0 12px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; color: #64806a; }
p { margin: 0 0 18px; color: #58665d; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #b1771b; outline-offset: 4px; }
.layout { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(0,1fr); gap: 24px; margin-top: 30px; }
.scene { background: #e9eee4; border: 1px solid #d6dfd1; border-radius: 20px; padding: 16px; align-self: start; min-width: 0; }
.scene-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; min-height: 28px; }
.scene-head strong { min-width: 0; overflow-wrap: anywhere; }
.scene-head a { color: #426447; font-size: 12px; flex-shrink: 0; }
/* ภาพรถและภาพอุปกรณ์ */
.picture { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1675 / 939; margin-top: 14px; overflow: hidden; border-radius: 12px; background: #f0f1ed; }
#vehicle-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.annotations { position: absolute; inset: 0; }
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.arrows line { stroke-width: 1.6; filter: drop-shadow(0 0 1px white); }
.callout { position: absolute; transform: translate(-50%,-50%); min-width: 34px; height: 30px; padding: 0 6px; border: 1.5px solid white; border-radius: 5px; background: var(--cat); color: white; font-weight: bold; font-size: 12px; box-shadow: 0 2px 6px #0006; }
.callout:hover { filter: brightness(1.2); }
.callout.internal { border-style: dashed; }
/* object-fit: contain รักษาภาพเต็มชิ้น ไม่ตัดเสาและใบพัด */
.equipment-view { position: absolute; inset: 0; display: grid; place-items: center; background: #f0f1ed; overflow: hidden; }
#equipment-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 12px; }
.equipment-view.vehicle-crop #equipment-image { padding: 0; object-fit: cover; transform-origin: center; }
#image-error { padding: 24px; text-align: center; }
.scene-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.caption { font-size: 12px; color: #64715e; line-height: 1.65; margin: 0; }
.scene-footer .caption { flex: 1 1 200px; }
.reset-view { position: static; flex-shrink: 0; background: #fff; border: 1px solid #cbd6c7; border-radius: 8px; padding: 10px 14px; color: #24342c; font-weight: bold; }
.reset-view:hover { background: #f6faf4; }
.detail { background: white; border: 1px solid #dce2d9; border-radius: 20px; padding: 28px; min-height: 420px; overflow-wrap: anywhere; }
.detail h2 { margin: 8px 0 14px; font-size: 26px; line-height: 1.4; }
.number { font-size: 12px; color: #63826a; letter-spacing: 1px; }
.detail h3 { font-size: 14px; margin: 22px 0 8px; }
.detail p { font-size: 15px; }
.groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: 26px; }
.group h3 { font-size: 13px; margin-bottom: 0; }
.list { display: grid; gap: 8px; margin-top: 10px; }
.list button { text-align: left; border: 1px solid #d5ddd0; background: white; color: #405841; border-radius: 10px; padding: 10px; font-size: 12px; min-height: 44px; overflow-wrap: anywhere; }
.list button:hover { border-color: #7b9877; }
.list button[aria-pressed=true] { background: #2d633f; color: white; border-color: #2d633f; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail { min-height: 0; }
}
@media (max-width: 520px) {
  header { padding: 16px; }
  main { padding: 26px 16px; }
  .scene { padding: 10px; }
  .scene-head { flex-wrap: wrap; }
  .groups { grid-template-columns: minmax(0,1fr); }
  .callout { min-width: 28px; height: 26px; font-size: 10px; }
  .arrows line { stroke-width: 2; }
  .detail { padding: 22px; }
  .detail h2 { font-size: 23px; }
  #equipment-image { padding: 6px; }
  .reset-view { min-height: 44px; font-size: 12px; }
}

/* โลโก้บริษัท */
.intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.intro-copy { flex: 1; min-width: 0; }
.company-logo { display: block; width: clamp(96px,14vw,160px); height: auto; aspect-ratio: 1; object-fit: contain; flex-shrink: 0; border-radius: 12px; }
#overview-details p { line-height: 1.85; }
#overview-details p:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
  .intro { gap: 12px; }
  .company-logo { width: 76px; border-radius: 8px; }
  .intro-copy h1 { font-size: 25px; }
}

/* Language selector stays at the top right on desktop and mobile. */
header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.language-control { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-control label { font-size: 12px; color: #58665d; }
.language-control select { font: inherit; font-size: 14px; color: #24342c; background: #fff; border: 1px solid #cbd6c7; border-radius: 9px; padding: 9px 12px; min-height: 44px; cursor: pointer; }
.language-control select:focus-visible { outline: 3px solid #b1771b; outline-offset: 3px; }
h1 { white-space: pre-line; }
/* Use all available image height while preserving the original proportions. */
#equipment-image { padding: 0; }
@media (max-width: 520px) {
  .language-control { gap: 0; }
  .language-control label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .language-control select { width: 108px; }
  header strong { font-size: 16px; }
}

#connection {
  white-space: pre-line;
}
