body.temperature-modal-open { overflow: hidden; }
body.temperature-scanner-open { overflow: hidden; }
.temperature-overview { margin-top: 32px; padding: 24px; border-radius: 16px; background: #0D3152; color: #fff; box-shadow: 0 12px 30px rgba(10,37,64,.14); }
.temperature-overview h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 20px; font-weight: 750; }
.temperature-overview h2 span { color: #4A7BFF; font-size: 28px; line-height: 1; }
.temperature-overview__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.temperature-overview__card { display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: rgba(255,255,255,.12); }
.temperature-overview__icon { color: #4A7BFF; font-size: 34px; font-weight: 800; line-height: 1; }
.temperature-overview__card--views .temperature-overview__icon { color: #0AD9B2; }
.temperature-overview__card strong { margin-top: 10px; font-size: 34px; line-height: 1; font-weight: 800; }
.temperature-overview__card small { margin-top: 10px; color: #D7E1EB; font-size: 14px; }
.temperature-scan-trigger { display: none; }
.temperature-scanner { position: fixed; inset: 0; z-index: 11000; display: none; }
.temperature-scanner--open { display: flex; align-items: center; justify-content: center; padding: 16px; }
.temperature-scanner__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .86); }
.temperature-scanner__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: hidden auto; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.temperature-scanner__panel header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 22px; background: #0A3154; color: #fff; }
.temperature-scanner__panel header h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 21px; font-weight: 750; }
.temperature-scanner__panel header button { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }
.temperature-scanner__viewport { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: #101820; }
.temperature-scanner__viewport video { width: 100%; height: 100%; object-fit: cover; }
.temperature-scanner__shade { position: absolute; inset: 0; background: rgba(0,0,0,.18); pointer-events: none; }
.temperature-scanner__frame { position: absolute; left: 15%; right: 15%; top: 20%; aspect-ratio: 1; }
.temperature-scanner__frame i { position: absolute; width: 54px; height: 54px; border-color: #fff; border-style: solid; }
.temperature-scanner__frame i:nth-child(1) { left: 0; top: 0; border-width: 6px 0 0 6px; }
.temperature-scanner__frame i:nth-child(2) { right: 0; top: 0; border-width: 6px 6px 0 0; }
.temperature-scanner__frame i:nth-child(3) { right: 0; bottom: 0; border-width: 0 6px 6px 0; }
.temperature-scanner__frame i:nth-child(4) { left: 0; bottom: 0; border-width: 0 0 6px 6px; }
.temperature-scanner__frame span { position: absolute; left: 5%; right: 5%; top: 50%; height: 2px; background: #4A7BFF; box-shadow: 0 0 10px #4A7BFF; animation: temperature-scan-line 2s ease-in-out infinite; }
@keyframes temperature-scan-line { 0%, 100% { transform: translateY(-110px); } 50% { transform: translateY(110px); } }
.temperature-scanner__panel footer { display: flex; flex-direction: column; align-items: center; padding: 20px; text-align: center; color: #475569; }
.temperature-scanner__panel footer strong { font-size: 15px; font-weight: 600; }
.temperature-scanner__panel footer small { margin-top: 5px; color: #94A3B8; }
.temperature-scanner__error { color: #DC2626; }
.temperature-scanner__album { margin-top: 14px; padding: 9px 16px; border: 1px solid #C7D2FE; border-radius: 9px; color: #4A7BFF; font-size: 13px; font-weight: 700; cursor: pointer; }
.temperature-modal { position: fixed; inset: 0; z-index: 10000; display: none; }
.temperature-modal--open { display: block; }
.temperature-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 37, 64, .62); backdrop-filter: blur(5px); }
.temperature-modal__panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(960px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 32px)); overflow: auto; background: #F8FAFC; border-radius: 20px; box-shadow: 0 30px 80px rgba(10, 37, 64, .3); }
.temperature-modal__content { padding: 32px; }
.temperature-modal__close { position: sticky; float: right; top: 16px; margin: 16px 16px -56px 0; z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; color: #64748B; font-size: 25px; line-height: 1; cursor: pointer; box-shadow: 0 4px 18px rgba(10,37,64,.12); }
.temperature-modal__header { display: flex; align-items: flex-start; justify-content: space-between; padding: 6px 50px 22px 0; border-bottom: 1px solid #E2E8F0; margin-bottom: 22px; }
.temperature-modal__header h2 { color: #0A2540; font-size: 28px; line-height: 1.25; font-weight: 750; margin: 3px 0 4px; }
.temperature-modal__header p { color: #64748B; margin: 0; font-size: 14px; }
.temperature-modal__header--detail { align-items: center; }
.temperature-modal__header--detail h2 { font-size: 14px; line-height: 1.5; font-weight: 650; color: #475569; margin-top: 5px; }
.temperature-modal__eyebrow { color: #4A7BFF; font-size: 11px; letter-spacing: .14em; font-weight: 800; }
.temperature-results { display: grid; gap: 14px; }
.temperature-result { position: relative; width: 100%; border: 1px solid #E2E8F0; border-radius: 14px; background: #fff; padding: 20px 48px 18px 20px; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.temperature-result:hover { border-color: #4A7BFF; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(74,123,255,.12); }
.temperature-result__top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.temperature-result__top strong { display: block; color: #0A2540; font-size: 18px; margin-top: 2px; }
.temperature-result__label { display: block; color: #94A3B8; font-size: 12px; }
.temperature-result__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.temperature-result__grid span { display: block; color: #94A3B8; font-size: 12px; margin-bottom: 3px; }
.temperature-result__grid b { display: block; color: #475569; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.temperature-result__arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #4A7BFF; font-size: 30px; }
.temperature-badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border-radius: 999px; background: #DCFCE7; color: #15803D; font-size: 12px; font-weight: 700; white-space: nowrap; }
.temperature-badge--high { background: #FEE2E2; color: #DC2626; }
.temperature-badge--low { background: #DBEAFE; color: #2563EB; }
.temperature-badge--unknown { background: #E2E8F0; color: #64748B; }
.temperature-result-status { display: inline-flex; min-width: 74px; padding: 8px 12px; border-radius: 13px; background: #DCFCE7; color: #15803D; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.temperature-result-status strong { font-size: 18px; font-weight: 800; }
.temperature-result-status small { margin-top: 4px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.temperature-result-status.temperature-badge--high { background: #FEE2E2; color: #DC2626; }
.temperature-result-status.temperature-badge--low { background: #DBEAFE; color: #2563EB; }
.temperature-result-status.temperature-badge--unknown { background: #E2E8F0; color: #64748B; }
.temperature-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #64748B; padding: 36px; }
.temperature-state h2 { color: #0A2540; font-size: 24px; margin: 14px 0 8px; }
.temperature-state p { margin: 0; }
.temperature-state__icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #FEE2E2; color: #DC2626; font-size: 27px; font-weight: 800; }
.temperature-state__icon--empty { background: #E8F1FF; color: #4A7BFF; }
.temperature-spinner { width: 38px; height: 38px; border: 4px solid #DCE6FF; border-top-color: #4A7BFF; border-radius: 50%; animation: temperature-spin .75s linear infinite; margin-bottom: 14px; }
@keyframes temperature-spin { to { transform: rotate(360deg); } }
.temperature-back { position: sticky; top: 16px; z-index: 3; display: inline-flex; align-items: center; min-height: 38px; border: 0; border-radius: 999px; background: #fff; color: #4A7BFF; font-weight: 700; cursor: pointer; padding: 8px 14px; margin: 0 0 14px; box-shadow: 0 4px 18px rgba(10,37,64,.12); transition: color .2s, box-shadow .2s, transform .2s; }
.temperature-back:hover { color: #315FE4; box-shadow: 0 7px 22px rgba(10,37,64,.18); transform: translateY(-1px); }
.temperature-section-title { color: #0A2540; font-size: 18px; font-weight: 750; margin: 26px 0 14px; }
.temperature-timeline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.temperature-timeline::before { content: ''; position: absolute; left: 17%; right: 17%; top: 27px; height: 2px; background: #DCE6FF; z-index: 0; }
.temperature-timeline__item { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 15px; border: 1px solid #DCE6FF; border-radius: 13px; background: linear-gradient(135deg,#fff 0%,#F7FAFF 100%); }
.temperature-timeline__icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #4A7BFF; color: #fff; font-size: 13px; box-shadow: 0 5px 14px rgba(74,123,255,.22); }
.temperature-timeline__item small { display: block; color: #94A3B8; font-size: 12px; }
.temperature-timeline__item strong { display: block; margin-top: 4px; color: #0A2540; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.temperature-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.temperature-summary__item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 15px; }
.temperature-summary__icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: #E8F1FF; color: #4A7BFF; font-weight: 800; }
.temperature-summary__item small { display: block; color: #94A3B8; font-size: 12px; }
.temperature-summary__item strong { display: block; color: #0A2540; margin-top: 2px; font-size: 14px; overflow-wrap: anywhere; }
.temperature-chart-wrap { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 14px; overflow-x: auto; }
.temperature-chart { display: block; width: 100%; min-width: 680px; height: auto; }
.temperature-table-wrap { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; overflow: auto; }
.temperature-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.temperature-table th { text-align: left; color: #64748B; background: #F1F5F9; font-size: 12px; padding: 12px 16px; }
.temperature-table td { color: #334155; font-size: 13px; padding: 13px 16px; border-top: 1px solid #EEF2F7; }
.temperature-empty-detail { color: #64748B; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 22px; text-align: center; }
@media (max-width: 760px) {
  .temperature-overview { margin-top: 24px; padding: 20px 16px; }
  .temperature-overview h2 { font-size: 18px; }
  .temperature-overview__grid { gap: 12px; }
  .temperature-overview__card { min-height: 130px; }
  .temperature-overview__card strong { font-size: 28px; }
  .temperature-back { top: 12px; min-height: 36px; padding: 7px 12px; font-size: 13px; }
  .temperature-scan-trigger { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; margin: -8px 0 2px; padding: 10px 0 0; border: 0; background: transparent; color: #4A7BFF; font-size: 15px; font-weight: 600; cursor: pointer; }
  .temperature-scan-trigger__or { color: #475569; font-weight: 400; margin-right: 4px; }
  .temperature-scan-trigger__icon { font-size: 24px; line-height: 1; }
  .temperature-scanner--open { align-items: center; padding: 12px; }
  .temperature-scanner__panel { max-height: calc(100vh - 24px); border-radius: 16px; }
  .temperature-scanner__panel header { min-height: 64px; padding: 0 18px; }
  .temperature-scanner__viewport { width: 100%; height: min(58vh, 520px); max-height: none; aspect-ratio: auto; }
  .temperature-modal__panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 16px; }
  .temperature-modal__content { padding: 22px 16px; }
  .temperature-result__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .temperature-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .temperature-timeline { grid-template-columns: 1fr; }
  .temperature-timeline::before { display: none; }
  .temperature-modal__header h2 { font-size: 22px; }
}
@media (max-width: 440px) {
  .temperature-scanner__panel header h2 { font-size: 19px; }
  .temperature-scanner__viewport { height: min(54vh, 460px); }
  .temperature-scanner__panel footer { padding: 16px 14px; }
  .temperature-summary { grid-template-columns: 1fr; }
}
