/* Shared navigation chrome, independent of the three scene layouts. */
#index-dialog .experience .experience-head .index-navigation{
  display:inline-flex;align-items:center;flex-shrink:0;max-width:100%;padding:5px;
  border:1px solid var(--line);border-radius:14px;
  background:color-mix(in srgb,var(--panel) 92%,transparent);
  backdrop-filter:blur(22px);box-shadow:0 6px 25px #0002;
}
#index-dialog .experience .experience-head .index-navigation .view-tabs{
  width:auto;gap:3px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;
}
#index-dialog .experience .experience-head .index-navigation .view-tabs button{
  padding:10px 14px;font-size:12px;gap:8px;border-radius:9px;
}
#index-dialog .experience .experience-head #people-fullscreen{
  display:flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;
  margin:0 0 0 6px;padding:8px 13px;min-height:30px;border:0;border-left:1px solid var(--line);
  border-radius:0;background:transparent;backdrop-filter:none;box-shadow:none;font-size:12px;color:var(--secondary);
}
#index-dialog .experience .experience-head #people-fullscreen:hover{color:var(--red)}
#index-dialog #people-fullscreen svg{width:16px;height:16px;flex-shrink:0}

/* One reading surface: the intended gift budget is the main visual anchor. */
#people-view .detail-panel{
  width:356px;background:color-mix(in srgb,var(--panel) 81%,transparent);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
#people-view .detail-top{color:var(--muted);letter-spacing:1.2px}
#people-view .persona-title-row{margin-top:9px;margin-bottom:24px}
#people-view .budget-units{background:rgb(0 0 0 / 16%)}
#people-view .budget-units button[aria-pressed=true]{
  background:color-mix(in srgb,var(--text) 12%,transparent);color:var(--text);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--text) 20%,transparent);
}
#people-view .detail-panel .budget-spotlight{margin:0;padding:0;border:0}
#people-view .budget-intention{font-size:14px;line-height:1.5;letter-spacing:0;font-weight:400;color:var(--secondary);margin:0}
#people-view .budget-spotlight .person-budget{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:9px 0 14px}
#people-view .budget-spotlight .person-budget strong{color:var(--red);font-size:86px;line-height:1.06;letter-spacing:-5px;font-weight:400;font-variant-numeric:tabular-nums}
#people-view .budget-spotlight .person-budget span{max-width:none;color:var(--secondary);font-size:15px;line-height:1.5}
#people-view .budget-spotlight .person-budget[data-unit=salary]>span:last-child{flex-basis:100%;font-size:12px;margin-top:3px}
#people-view .budget-spotlight .person-budget .budget-estimate{align-self:center;font-size:29px;line-height:1;color:var(--muted)}
#people-view .budget-spotlight .budget-note{margin:-3px 0 20px;font-size:9px;color:var(--muted)}
#people-view .budget-country-row{border-top:1px solid var(--line);padding-top:12px;gap:10px}
#people-view .budget-country-row>span{font-size:10px;color:var(--muted);white-space:nowrap}
#people-view .budget-country-row .persona-select{max-width:62%;width:160px}
#people-view .comparison-heading .persona-select{display:inline-flex;align-items:center;gap:6px}
#people-view .comparison-persona-icon{display:inline-grid;flex:none;place-items:center;width:19px;height:19px;color:var(--text)}
#people-view .comparison-persona-icon svg{display:block;width:18px;height:18px}
#people-view .budget-rank{margin:10px 0 18px;font-size:10px;color:var(--muted)}
#people-view #compare-people{border-top:1px solid var(--line);padding-top:12px}

/* A folded corner ribbon leaves the title, budget and controls unobstructed. */
#people-view .detail-panel:has(.person-card-content){display:flex;flex-direction:column;padding:0;overflow:visible}
#people-view .person-card-content{min-height:0;padding:0 22px 22px;max-height:calc(100dvh - 152px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;border-radius:inherit}
/* Keep navigation outside the scroll area, on the card's single glass surface. */
#people-view .detail-panel:has(.card-ribbon) .person-navigation{position:relative;top:auto;flex:none;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;background:transparent;border-bottom:0;margin:16px 16px 28px;padding-bottom:0}

@media(min-width:801px){
  #index-dialog #people-view .detail-panel{
    top:50%;bottom:auto;transform:translateY(-50%);max-height:calc(100% - 184px);
  }
}
@media(max-width:1100px) and (min-width:801px){
  #people-view .detail-panel{width:328px}
}
@media(max-width:800px){
  #index-dialog .experience .experience-head{justify-content:center}
  #index-dialog .experience .experience-head .index-navigation{margin-inline:auto}
  #index-dialog .experience .experience-head .index-navigation{padding:4px}
  #index-dialog .experience .experience-head .index-navigation .view-tabs{gap:0}
  #index-dialog .experience .experience-head .index-navigation .view-tabs button{padding:8px 9px;font-size:10px;gap:5px}
  #index-dialog .experience .experience-head #people-fullscreen{margin-left:4px;padding:6px 10px;min-height:28px;gap:5px;font-size:10px}
  #index-dialog #people-fullscreen svg{width:14px;height:14px}
  #people-view .detail-panel{width:auto;max-height:48%}
  #people-view .person-card-content{padding:0 16px 14px;max-height:calc(48dvh - 2px)}
  #people-view .detail-panel:has(.card-ribbon) .person-navigation{margin:16px 16px 25px}
  #people-view .persona-title-row{margin:6px 0 17px}
  #people-view .budget-intention{font-size:12px}
  #people-view .budget-spotlight .person-budget{margin:6px 0 12px;gap:4px 8px}
  #people-view .budget-spotlight .person-budget strong{font-size:64px;letter-spacing:-3px}
  #people-view .budget-spotlight .person-budget span{font-size:13px}
  #people-view .budget-spotlight .person-budget[data-unit=salary]>span:last-child{font-size:11px;margin:0}
  #people-view .budget-spotlight .person-budget .budget-estimate{font-size:24px}
  #people-view .budget-spotlight .budget-note{margin:-3px 0 12px;font-size:8px}
  #people-view .budget-country-row{padding-top:8px}
  #people-view .budget-rank{font-size:9px;margin:7px 0 12px}
}
@media(max-width:380px){
  #index-dialog .experience .experience-head .index-navigation .view-tabs button{padding:8px 4px;font-size:9px;gap:3px}
  #index-dialog .experience .experience-head .index-navigation .view-tabs button>span{display:inline;font-size:6px}
  #index-dialog .experience .experience-head #people-fullscreen{padding:6px 8px}
  #index-dialog #people-fullscreen .close-label{display:none}
}

/* People overview: who gets the most in one country. */
#people-view .people-ranking-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;margin:14px 0 6px;padding-top:12px;border-top:1px solid var(--line)}
#people-view .people-ranking-head .budget-units{flex:none}
#people-view .people-ranking-head .budget-units button{white-space:nowrap}
#people-view .people-ranking-head>span{flex:1 1 120px;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--secondary)}
#people-view .people-ranking{list-style:none;margin:0;padding:0;display:grid;gap:1px}
#people-view .people-ranking button{display:grid;grid-template-columns:16px 18px minmax(0,92px) 1fr auto;align-items:center;gap:7px;width:100%;margin:0;padding:3px 2px;border:0;border-radius:6px;box-shadow:none;color:var(--text);text-align:left;font-size:11px;line-height:1.2;background:transparent;transition:background .2s}
#people-view .people-ranking button:hover,#people-view .people-ranking button:focus-visible{background:color-mix(in srgb,var(--text) 7%,transparent)}
#people-view .people-ranking-rank{font-size:9px;color:var(--muted);font-variant-numeric:tabular-nums}
#people-view .people-ranking-icon{display:grid;place-items:center;width:18px;height:18px;color:var(--secondary)}
#people-view .people-ranking-icon svg{width:15px;height:15px}
#people-view .people-ranking b{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#people-view .people-ranking i{display:block;height:4px;border-radius:2px;background:color-mix(in srgb,var(--text) 8%,transparent);overflow:hidden}
#people-view .people-ranking i span{display:block;height:100%;border-radius:2px;background:var(--red)}
#people-view .people-ranking em{font-style:normal;font-variant-numeric:tabular-nums;white-space:nowrap}
#people-view .people-ranking em small{font-size:9px;color:var(--muted)}
#people-view .people-ranking-empty{font-size:11px;color:var(--muted)}
#people-view .people-overview #overview-children{margin-top:12px}
#people-view .people-ranking-more summary{cursor:pointer;margin:4px 0 0;padding:4px 2px;font-size:10px;color:var(--secondary);list-style:none}
#people-view .people-ranking-more summary::-webkit-details-marker{display:none}
#people-view .people-ranking-more summary::before{content:'+ ';color:var(--red)}
#people-view .people-ranking-more[open] summary::before{content:'− '}
#people-view .people-overview .budget-units button{margin:0;border:0;box-shadow:none}
