/* Map-first portrait layout approved by the owner; wider views keep their layout. */
.ndc-phone-goals{display:none}
@media(max-width:700px) and (orientation:portrait){
 #ndc-approved-scene{padding:8px max(10px,env(safe-area-inset-right)) 18px max(10px,env(safe-area-inset-left));background-position:center top;background-size:auto 100%;}
 #ndc-approved-scene .ndc-compact-identity{position:relative;width:100%;padding-top:34px;grid-template-columns:48px minmax(0,1fr) 48px;gap:4px;align-items:center}
 #ndc-approved-scene .ndc-right-group{position:static;align-self:center}
 #ndc-approved-scene .ndc-retained-partners{position:absolute;top:0;right:0;left:48px;max-width:none;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:5px;transform:none;height:30px}
 #ndc-approved-scene .ndc-retained-partners>a{display:flex;min-width:0;flex:0 0 28px;align-items:center;justify-content:center}
 #ndc-approved-scene .ndc-retained-partners img{display:block;width:calc((100vw - 106px)/7);max-width:48px;min-width:0;height:28px;object-fit:contain;flex-shrink:1}
 #ndc-approved-scene .ndc-retained-partners .ndc-sdg-mark{width:28px}
 #ndc-approved-scene .ndc-composite{width:190px;height:92px;max-width:100%;object-fit:contain}
 #ndc-approved-scene summary{font-size:11px;line-height:1.3;min-height:44px;gap:2px}
 #ndc-approved-scene .ndc-nine-dots{padding:6px}
 #ndc-approved-scene>.ndc-masthead-model{font-size:10px;gap:3px;margin:2px auto;padding:2px 0;white-space:nowrap;flex-wrap:nowrap}
 #ndc-approved-scene .ndc-dashboard-shell{padding:3px 0}
 #ndc-approved-scene .ndc-dashboard-heading{margin:2px 0 6px!important}
 #ndc-approved-scene .ndc-dashboard-heading h2{font-size:clamp(16px,4.5vw,20px);line-height:1.4}
 #ndc-approved-scene{display:flex;flex-direction:column}
 #ndc-approved-scene .ndc-dashboard-grid{display:flex;flex-direction:column;gap:8px}
 #ndc-approved-scene .ndc-map-column{order:0;position:relative;display:block;width:100%;padding:0;min-height:0}
 #ndc-approved-scene .ndc-map-title,#ndc-approved-scene .ndc-map-summary,#ndc-approved-scene .ndc-map-rank-legend{display:none}
 #ndc-approved-scene .ndc-map-stage{display:block;width:62%;padding:0;position:relative;min-height:0}
 #ndc-approved-scene .ndc-map-art{width:100%;height:clamp(255px,72vw,320px);max-width:100%;aspect-ratio:auto;margin:0}
 #ndc-approved-scene .ndc-map-art>img{object-fit:contain;object-position:center top}
 #ndc-approved-scene .ndc-ranking-overlay{object-fit:contain}
 #ndc-approved-scene .ndc-phone-goals{display:flex;flex-direction:column;position:absolute;top:4px;right:0;width:37%;padding:10px 9px;background:linear-gradient(130deg,#ffffffec,#e8f8ffe0);border:1px solid #cce5f3;border-radius:13px;color:#103763;line-height:1.35;z-index:1}
 #ndc-approved-scene .ndc-phone-goals p{font-size:20px;font-weight:700;margin:0 0 2px}
 #ndc-approved-scene .ndc-phone-goals>span{font-size:14px;font-weight:600}
 #ndc-approved-scene .ndc-phone-goals>strong{display:flex;align-items:baseline;gap:3px;flex-wrap:wrap;margin:2px 0}
 #ndc-approved-scene .ndc-phone-goals .ndc-metric-number{font-size:36px;color:#123e73!important;line-height:1.1}
 #ndc-approved-scene .ndc-phone-goals .phone-target .ndc-metric-number{color:#19823d!important}
 #ndc-approved-scene .ndc-phone-goals .ndc-metric-unit{font-size:11px;color:#123e73}
 #ndc-approved-scene .ndc-phone-goals>b{font-size:29px;color:#123e73;line-height:1.2}
 #ndc-approved-scene .ndc-phone-goals hr{width:100%;border:0;border-top:1px solid #a5c8dc;margin:8px 0}
 #ndc-approved-scene .ndc-saraburi-callout{position:absolute;left:48%;top:55%;width:51%;max-width:125px;padding:7px 5px;margin:0;background:#064e78e8;border:1px solid #d4f2ff;border-radius:10px;z-index:2}
 #ndc-approved-scene .ndc-saraburi-callout b{font-size:14px}
 #ndc-approved-scene .ndc-saraburi-callout small{font-size:14px;line-height:1.3}
 #ndc-approved-scene .ndc-sdg-note{margin:3px 0 0;padding:2px 4px;font-size:10px;width:100%;background:#07517480}
 #ndc-approved-scene .ndc-plan-column{order:1;width:100%;padding:0;background:none;border:0;box-shadow:none}
 #ndc-approved-scene .ndc-plan-head{display:none}
 #ndc-approved-scene .ndc-sector-list{gap:3px;margin:0}
 #ndc-approved-scene .ndc-sector-row{min-height:44px;grid-template-columns:29px minmax(0,1fr) 10px;gap:8px;padding:5px 10px;border:1px solid #c9e0ed;border-radius:12px;background:linear-gradient(110deg,#fff,#f0f8ff);box-shadow:0 2px 2px #063d6420}
 #ndc-approved-scene .ndc-sector-row strong{font-size:clamp(12px,3.45vw,15px);line-height:1.4;color:#103763!important}
 #ndc-approved-scene .ndc-sector-icon{width:29px;height:29px}
 #ndc-approved-scene .ndc-sector-icon svg{width:19px;height:19px}
 #ndc-approved-scene .ndc-plan-button{min-height:44px;margin:8px 0}
 #ndc-approved-scene .ndc-target-column{order:2;width:100%;margin-top:8px}
 #ndc-approved-scene .ndc-target-column .ndc-total-card{display:none}
 #ndc-approved-scene .ndc-result-card{grid-column:1/-1}
 #ndc-approved-scene .ndc-dashboard-footnote{font-size:11px}
 body:has(#ndc-approved-scene) #fec-global-navigation{padding:7px max(10px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));font-size:14px}
}
.ndc-phone-side{display:none}
@media(max-width:700px) and (orientation:portrait){
 #ndc-approved-scene .ndc-map-column{display:grid;grid-template-columns:minmax(0,62fr) minmax(0,38fr);align-items:start;column-gap:0;row-gap:4px}
 #ndc-approved-scene .ndc-phone-side{display:flex;flex-direction:column;gap:6px;grid-column:2;grid-row:1;min-width:0;padding-top:4px;z-index:1}
 #ndc-approved-scene .ndc-phone-goals{position:relative;top:auto;right:auto;width:100%;box-sizing:border-box;padding:8px}
 #ndc-approved-scene .ndc-phone-goals hr{margin:5px 0}
 #ndc-approved-scene .ndc-map-stage{grid-column:1;grid-row:1;width:100%}
 #ndc-approved-scene .ndc-sdg-note{grid-column:1/-1}
}

#ndc-approved-scene #statisticsInfo[hidden]{display:none!important}

@media(max-width:700px) and (orientation:portrait){
 #ndc-approved-scene .ndc-phone-goals .ndc-metric-number{font-size:clamp(22px,6.6vw,30px)}
 #ndc-approved-scene .ndc-saraburi-callout small{font-size:12px;overflow-wrap:anywhere}
}

/* The row follows the map and goal card in normal flow at every screen size. */
#ndc-approved-scene .ndc-map-column > .site-statistics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) minmax(0,.95fr);
  align-items: stretch;
  gap: 5px;
  width: 100%;
  max-width: 440px;
  margin: 8px auto 2px;
  padding: 0;
  white-space: normal;
}
#ndc-approved-scene .site-statistics :is(.overview-visits,.overview-follow,.overview-admin) {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1px 4px;
  min-width: 0;
  min-height: 46px;
  padding: 4px;
  box-sizing: border-box;
  border: 1px solid #71b6dd;
  border-radius: 12px;
  background: linear-gradient(135deg,#fff,#e5f5ff);
  color: #103763;
  font-family: inherit;
  font-weight: 650;
  font-size: clamp(12px,1.2vw,14px);
  line-height: 1.3;
  box-shadow: 0 2px 4px #08456d26;
  text-align: center;
}
#ndc-approved-scene .site-statistics .overview-follow {flex-direction: column;cursor: pointer}
#ndc-approved-scene .site-statistics .overview-follow small {font-size: 11px;color: #35566c}
#ndc-approved-scene .site-statistics .overview-follow[aria-pressed="true"] {background: #d9f5e6;border-color: #398963}
#ndc-approved-scene .site-statistics .overview-admin {color: white;background: #10456c;text-decoration: none}
#ndc-approved-scene .overview-admin img {width: 26px;height: 26px;object-fit: contain;border-radius: 7px;background: #fff}
#ndc-approved-scene .site-statistics :is(a,button):focus-visible {outline: 3px solid #f2ae19;outline-offset: 2px}
#ndc-approved-scene #overviewFollowStatus:not([hidden]) {grid-column: 1 / -1;padding: 4px;background: #fff;color: #813518;text-align: center}

#ndc-approved-scene .ndc-map-stage{position:relative}
#ndc-approved-scene .ndc-saraburi-callout{
 position:absolute;inset:53% 0 auto auto;z-index:4;width:max-content;max-width:53%;
 margin:0;padding:12px clamp(8px,1.15vw,18px);display:block;text-align:center;
 background:#075569;border:1px solid #8ae1cb;border-radius:12px;
}
#ndc-approved-scene .ndc-saraburi-callout::before,
#ndc-approved-scene .ndc-saraburi-callout::after{content:none}
#ndc-approved-scene .ndc-saraburi-callout b{display:block;font-size:clamp(12px,1.05vw,17px)}
#ndc-approved-scene .ndc-saraburi-callout small{display:block;font-size:clamp(12px,1.2vw,20px);overflow-wrap:normal}
#ndc-approved-scene .ndc-saraburi-callout :is(.ndc-quote-open,.ndc-quote-close){
 display:block;position:absolute;color:#aaf6db!important;font:30px/.8 Georgia,serif;text-shadow:none;
}
#ndc-approved-scene .ndc-quote-open{top:4px;left:4px}
#ndc-approved-scene .ndc-quote-close{bottom:-8px;right:4px}
#ndc-approved-scene .ndc-saraburi-leader{
 position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:3;pointer-events:none;visibility:hidden;
}
#ndc-approved-scene .ndc-saraburi-leader path{fill:none;stroke-linecap:round;stroke-linejoin:round}
#ndc-approved-scene .ndc-saraburi-arrow-shadow{stroke:#173445;stroke-width:5}
#ndc-approved-scene .ndc-saraburi-arrow{stroke:#e4fff7;stroke-width:2.5}
#ndc-approved-scene .ndc-saraburi-pin{fill:#075569;stroke:#e4fff7;stroke-width:2}
#ndc-approved-scene .ndc-saraburi-pin-core{fill:#e4fff7}
@media(max-width:700px){
 #ndc-approved-scene .ndc-map-rank-legend{grid-row:2}
}
