:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#10243a;background:#f5f7fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.75rem,5vw,2.8rem);line-height:1.1;letter-spacing:-.04em}h2{font-size:1.25rem;letter-spacing:-.02em}h3{font-size:1rem}small,.muted{color:#65768a}.shell{max-width:1180px;margin:auto;padding:0 18px 110px}.top{height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:11px;font-size:1.08rem;font-weight:800;letter-spacing:-.025em}.brand-mark{width:40px;height:40px;border-radius:13px;background:#071b32;color:#f5b94f;display:grid;place-items:center;font-size:1.1rem}.top-actions{display:flex;align-items:center;gap:9px}.tiny-btn{background:#fff;border:1px solid #dbe2e8;color:#10243a;padding:10px 13px;border-radius:12px;font-size:.84rem;font-weight:650}.hero{background:#071b32;color:#fff;border-radius:25px;padding:28px 23px 26px;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;background:radial-gradient(circle,#31587a,transparent 68%);right:-70px;top:-85px;opacity:.7}.hero>*{position:relative;z-index:1}.eyebrow{text-transform:uppercase;letter-spacing:.16em;color:#f5b94f;font-weight:800;font-size:.69rem}.hero h1{max-width:560px;margin:11px 0}.hero p{max-width:530px;color:#cbd7e3;line-height:1.5;margin:0 0 22px}.searchbar{display:flex;gap:8px;background:#fff;border-radius:15px;padding:6px;box-shadow:0 12px 40px #00111e30}.searchbar input{border:0;flex:1;min-width:0;padding:10px 9px;outline:none;background:transparent}.searchbar button{border:0;border-radius:11px;padding:11px 17px;background:#f5b94f;font-weight:800;color:#172333}.section-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:29px 2px 15px}.section-head h2{margin:0}.chips{display:flex;gap:8px;overflow:auto;padding:3px 0 13px;scrollbar-width:none}.chip{white-space:nowrap;border:1px solid #d7e1e9;background:#fff;border-radius:100px;padding:10px 14px;color:#415367;font-weight:650;font-size:.82rem}.chip.active{background:#102b44;color:#fff;border-color:#102b44}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.card{background:#fff;border:1px solid #e5eaf0;border-radius:19px;overflow:hidden;box-shadow:0 5px 20px #10243a08}.thumb{aspect-ratio:1.36;background:linear-gradient(145deg,#d5e2e9,#edf2f5);display:flex;align-items:center;justify-content:center;overflow:hidden;color:#4c6681;font-size:2.5rem}.thumb img,.thumb video{width:100%;height:100%;object-fit:cover}.card-body{padding:13px}.card h3{line-height:1.25;margin:6px 0;font-size:.92rem}.card-meta{display:flex;justify-content:space-between;gap:6px;font-size:.7rem;color:#758497}.tag{display:inline-block;border-radius:6px;background:#e8eff5;color:#43647c;padding:4px 7px;font-size:.63rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.btn{border:0;border-radius:13px;padding:12px 16px;min-height:44px;font-weight:750;background:#102b44;color:#fff}.btn.gold{background:#f5b94f;color:#16283a}.btn.light{background:#eaf0f4;color:#18364c}.btn.danger{background:#fce8e8;color:#9d2929}.btn:disabled{opacity:.55}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wrap{flex-wrap:wrap}.stack{display:grid;gap:12px}.panel{background:#fff;border:1px solid #e2e8ef;border-radius:19px;padding:17px}.panel h2{margin-bottom:15px}.field{display:grid;gap:6px}.field label{font-weight:750;font-size:.82rem;color:#384b5f}.field input,.field select,.field textarea,.input{width:100%;border:1px solid #cfdce6;border-radius:12px;background:#fff;color:#182d40;padding:12px;min-height:46px;outline:none}.field textarea{min-height:115px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#477996;box-shadow:0 0 0 3px #47799622}.form{display:grid;gap:14px}.two{display:grid;gap:13px}.nav{position:fixed;bottom:0;left:0;right:0;z-index:30;background:#fff;border-top:1px solid #dae2e9;display:flex;justify-content:space-around;padding:7px 6px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px #10243a0a}.nav button{display:grid;place-items:center;gap:2px;border:0;background:transparent;color:#708195;min-width:56px;padding:6px 4px;font-size:.64rem;font-weight:750}.nav button.active{color:#0e3857}.nav .ico{font-size:1.25rem}.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.stat{background:#fff;border:1px solid #e1e8ee;border-radius:17px;padding:16px}.stat strong{display:block;font-size:1.8rem;letter-spacing:-.06em;color:#0e3550}.stat span{font-size:.74rem;color:#687a8d}.list{display:grid;gap:9px}.list-item{background:#fff;border:1px solid #e2e9ef;border-radius:15px;padding:15px;display:grid;gap:8px}.list-item h3{margin:0}.pill{border-radius:99px;padding:5px 9px;background:#e8eef4;color:#31536a;font-size:.7rem;font-weight:750}.pill.urgent{background:#ffebdb;color:#a94d18}.empty{text-align:center;padding:48px 22px;background:#fff;border:1px dashed #cbd8e2;border-radius:18px;color:#65768a}.empty .emoji{font-size:2rem;margin-bottom:8px}.sheet-back{position:fixed;inset:0;background:#071b3280;z-index:50;display:flex;align-items:end}.sheet{background:#fff;border-radius:24px 24px 0 0;padding:23px 19px calc(25px + env(safe-area-inset-bottom));width:100%;max-height:92vh;overflow:auto}.sheet .handle{width:45px;height:5px;background:#d4dce2;border-radius:9px;margin:-10px auto 17px}.preview{position:fixed;inset:0;background:#061829;z-index:60;display:grid;grid-template-rows:auto 1fr auto;color:#fff}.preview header,.preview footer{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:16px}.preview main{min-height:0;display:grid;place-items:center;padding:5px}.preview main img,.preview main video{max-width:100%;max-height:100%;object-fit:contain}.preview main iframe{width:100%;height:100%;border:0;background:#fff}.preview footer{background:#0d263d;flex-wrap:wrap}.preview .btn{background:#fff;color:#102b44}.login{max-width:440px;margin:45px auto}.login .brand{margin-bottom:30px}.login h1{margin-bottom:9px}.notice{background:#fff5dd;color:#594716;border-radius:12px;padding:12px 14px;font-size:.81rem}.error{background:#fdecec;color:#9d2929;border-radius:11px;padding:11px;font-size:.82rem}.success{background:#e7f6ed;color:#286347;border-radius:11px;padding:11px;font-size:.82rem}.timeline{border-left:2px solid #d8e4eb;margin-left:8px;padding-left:20px;display:grid;gap:16px}.event{position:relative;background:#fff;border:1px solid #e4eaef;padding:13px;border-radius:14px}.event:before{content:"";position:absolute;left:-27px;top:18px;width:10px;height:10px;background:#f5b94f;border-radius:50%}.desktop-nav{display:none}.install{background:#eaf1f5;border-radius:12px;padding:11px 13px;font-size:.78rem;color:#456174;margin-top:17px}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(min-width:700px){.shell{padding:0 28px 80px}.hero{padding:47px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}.two{grid-template-columns:repeat(2,1fr)}.stats{grid-template-columns:repeat(3,1fr)}.nav{display:none}.desktop-nav{display:flex;gap:5px}.desktop-nav button{border:0;background:transparent;padding:10px 12px;border-radius:10px;font-weight:700;color:#536779}.desktop-nav button.active{background:#e9f0f4;color:#183b55}.sheet-back{align-items:center;justify-content:center}.sheet{border-radius:22px;max-width:530px;padding:25px;box-shadow:0 25px 70px #0004}.preview main{max-width:1000px;width:100%;margin:auto}}@media(min-width:1000px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.stats{grid-template-columns:repeat(6,1fr)}}
.brand{gap:8px}.brand-wordmark{display:block;flex:none;width:100px;height:37px;background:url('/hm-corp-logo.png') -40px -122px/180px 180px no-repeat}.brand-divider{width:1px;height:24px;background:#cdd7df}.brand-product{font-size:1rem;white-space:nowrap}.hero-wordmark{width:105px;height:39px;margin-bottom:17px;background:url('/hm-corp-logo-white.png') -80px -171px/264px 264px no-repeat}.sign-in-short{display:none}@media(max-width:520px){.sign-in-full{display:none}.sign-in-short{display:inline}}
.page-guide{margin:0 0 18px;background:#fff;border:1px solid #dce5ec;border-radius:13px;color:#294358}.page-guide summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;cursor:pointer;font-size:.86rem;font-weight:750}.page-guide summary::-webkit-details-marker{display:none}.page-guide summary:focus-visible{outline:3px solid #477996;outline-offset:2px;border-radius:13px}.page-guide summary span{font-size:1.2rem;line-height:1;transition:transform .15s}.page-guide[open] summary span{transform:rotate(180deg)}.page-guide ol{margin:0;padding:0 20px 15px 37px;color:#4e6375;font-size:.83rem;line-height:1.5}.page-guide li+li{margin-top:6px}


/* Canonical HM account sign-in / registration UI — PR Dashboard visual identity */
.hm-auth-overlay{
  position:fixed;
  inset:0;
  z-index:100;
  background:#f5f7fb;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  overflow:auto;
  color:#0b1f3a;
}
.hm-auth-card{
  width:min(460px,100%);
  max-height:94vh;
  overflow:auto;
  background:#fff;
  color:#0b1f3a;
  border:1px solid #d7e1eb;
  border-radius:20px;
  padding:22px;
  box-shadow:0 8px 24px rgba(18,42,66,.045);
  margin:auto;
}
.auth-brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.auth-brand-logo{
  display:block;
  width:190px;
  max-width:60%;
  height:auto;
  object-fit:contain;
}
.auth-brand-divider{
  width:1px;
  height:38px;
  background:#ccd6e0;
  flex:none;
}
.auth-product{
  font-size:20px;
  font-weight:800;
  color:#0b1f3a;
  white-space:nowrap;
}
.auth-eyebrow{
  color:#d59a2e;
  font-weight:800;
  letter-spacing:.16em;
  font-size:12px;
  margin-top:14px;
}
.hm-auth-card h1{
  font-size:34px;
  line-height:1.05;
  letter-spacing:-.035em;
  margin:5px 0 4px;
  color:#0b1f3a;
}
.auth-sub{
  margin:0;
  color:#687b91;
  line-height:1.45;
}
.auth-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:16px 0;
}
.auth-tab{
  border:1px solid #cfdbe7;
  background:#fff;
  color:#0b1f3a;
  padding:10px;
  border-radius:11px;
  font-weight:700;
}
.auth-tab.active{
  background:#10243e;
  color:#fff;
  border-color:#10243e;
}
.auth-form{
  display:grid;
  gap:11px;
}
.auth-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.auth-field label{
  font-size:12px;
  color:#63758a;
}
.auth-field input,
.auth-field select{
  width:100%;
  background:#fff;
  border:1px solid #cfdbe7;
  color:#0b1f3a;
  padding:11px 12px;
  border-radius:11px;
  min-height:44px;
  outline:none;
}
.auth-field input:focus,
.auth-field select:focus{
  border-color:#7c9bb7;
  box-shadow:0 0 0 3px rgba(124,155,183,.16);
}
.auth-primary{
  border:0;
  border-radius:12px;
  padding:11px 14px;
  min-height:44px;
  font-weight:750;
  background:#f1bc57;
  color:#0b1f3a;
}
.auth-primary:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.auth-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.auth-hint,
.auth-footer{
  font-size:12px;
  color:#63758a;
  line-height:1.45;
}
.auth-footer{
  margin-top:14px;
}
.auth-message{
  margin-top:14px;
  padding:10px 12px;
  border-radius:11px;
  font-size:12px;
}
.auth-note{
  border:1px solid #caddec;
  background:#eef6fc;
  color:#23425f;
}
.auth-error{
  border:1px solid #efc0c4;
  background:#fff0f1;
  color:#8b2e34;
}
.auth-success{
  border:1px solid #a9dbc7;
  background:#effaf5;
  color:#19684f;
}
@media(max-width:600px){
  .hm-auth-overlay{align-items:flex-start;padding:26px 12px 18px}
  .hm-auth-card{padding:17px;border-radius:18px}
  .auth-brand-logo{width:165px}
  .auth-product{font-size:17px}
  .auth-grid{grid-template-columns:1fr}
}


/* HM auth registration usability V4 */
.password-shell{position:relative;display:flex;align-items:center}
.password-shell input{padding-right:82px}
.password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#425b73;font-size:12px;font-weight:700;padding:6px 7px;border-radius:7px;cursor:pointer}
.password-toggle:hover,.password-toggle:focus-visible{background:#eef3f8;color:#0b1f3a;outline:none}
.auth-inline-error{font-size:12px;line-height:1.35;color:#a83a42;margin-top:1px}


/* HM compact header + direct access switcher */
.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.header-context-select{width:auto;max-width:230px;min-width:120px;border:1px solid #cfdbe7;background:#fff;color:#10243e;border-radius:999px;padding:7px 30px 7px 11px;font-size:12px;font-weight:800;line-height:1.2}
.header-access-pill{display:inline-flex;align-items:center;max-width:230px;border:1px solid #cfdbe7;background:#fff;color:#10243e;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-account-btn{max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:760px){
  .header-context-select,.header-access-pill{max-width:150px;min-width:0}
  .header-account-btn{max-width:100px}
}


/* HM auth PR-style preservation */
.hm-auth-overlay{
  flex-direction:column;
  gap:12px;
}
.auth-brand-wordmark{
  flex:none;
  width:140px;
  height:52px;
  background-position:-56px -171px;
  background-size:252px 252px;
}
.auth-back-public{
  border:0;
  background:transparent;
  color:#425b73;
  font-size:13px;
  line-height:1.2;
  font-weight:700;
  padding:9px 12px;
  cursor:pointer;
}
.auth-back-public:hover,
.auth-back-public:focus-visible{
  color:#0b1f3a;
  text-decoration:underline;
  outline:none;
}
@media(max-width:600px){
  .auth-brand-wordmark{
    width:126px;
    height:47px;
    background-position:-50px -154px;
    background-size:227px 227px;
  }
}

.directory-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(3,minmax(140px,1fr)) auto;gap:10px;align-items:end}
.directory-filters select{width:100%}
.directory-note{margin:14px 2px}
.directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.directory-card{appearance:none;width:100%;border:1px solid var(--line);background:var(--panel);color:inherit;border-radius:18px;padding:18px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;font:inherit}
.directory-card:hover{border-color:var(--gold)}
.directory-card strong,.directory-card small{display:block}
.directory-card small{margin-top:5px;color:var(--muted)}
.directory-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.directory-chip{display:inline-flex;padding:4px 8px;border-radius:999px;background:rgba(190,148,57,.12);color:#8a641e;font-size:.72rem;font-weight:750;letter-spacing:.02em}
.directory-detail dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}
.directory-detail dl div{padding:12px;border:1px solid var(--line);border-radius:13px}
.directory-detail dt{font-size:.75rem;color:var(--muted);margin-bottom:4px}
.directory-detail dd{margin:0;font-weight:650;overflow-wrap:anywhere}
@media(max-width:800px){.directory-filters,.directory-grid,.directory-detail dl{grid-template-columns:1fr}}


/* HM login visual alignment V1 */
.hm-auth-overlay{
  flex-direction:column;
  gap:10px;
}

.auth-brand{
  position:relative;
}

.auth-brand::before{
  content:"";
  display:block;
  flex:none;
  width:145px;
  height:54px;
  background:url('/hm-corp-logo.png?v=authui4') -58px -177px / 261px 261px no-repeat;
}

.auth-brand-logo{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0;
  pointer-events:none;
}

.auth-back-public{
  border:0;
  background:transparent;
  color:#52677d;
  font-size:13px;
  font-weight:700;
  padding:8px 12px;
  cursor:pointer;
}

.auth-back-public:hover,
.auth-back-public:focus-visible{
  color:#0b1f3a;
  text-decoration:underline;
  outline:none;
}

@media(max-width:600px){
  .auth-brand::before{
    width:132px;
    height:49px;
    background-position:-53px -161px;
    background-size:238px 238px;
  }
}


/* HM POLISH V1 */

.agent-photo-note{
  margin:16px 0 18px;
  line-height:1.45;
}

.hm-modal-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(11,31,58,.46);
  backdrop-filter:blur(2px);
}

.hm-modal-card{
  width:min(720px,calc(100vw - 32px));
  max-height:min(86vh,860px);
  overflow:auto;
  background:#fff;
  border:1px solid #dbe5ee;
  border-radius:24px;
  box-shadow:0 22px 70px rgba(11,31,58,.24);
  padding:24px;
}

.hm-modal-top{
  display:flex;
  justify-content:flex-end;
  margin-bottom:4px;
}

.agent-modal-head small{
  display:block;
  margin-bottom:4px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  color:#718399;
}

.agent-modal-head h2{
  margin:0;
}

.agent-modal-head .muted{
  margin:5px 0 2px;
}

.agent-meta{
  margin:0 0 18px;
  color:#50657b;
  font-size:14px;
  font-weight:700;
}

.agent-current-photo-wrap{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:260px;
  padding:14px;
  background:#f2f6f9;
  border:1px solid #dce6ee;
  border-radius:18px;
  overflow:hidden;
}

.agent-current-photo{
  display:block;
  width:100%;
  max-height:380px;
  object-fit:contain;
  border-radius:12px;
}

.agent-current-badge{
  position:absolute;
  left:18px;
  bottom:18px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(11,31,58,.88);
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.agent-photo-empty{
  padding:42px 20px;
  border:1px dashed #cfdde7;
  border-radius:18px;
  text-align:center;
  color:#657b90;
}

.agent-modal-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.agent-approve-now{
  display:flex;
  gap:9px;
  align-items:center;
  margin-top:16px;
  font-weight:700;
}

.agent-photo-history{
  margin-top:22px;
  border-top:1px solid #e3ebf1;
  padding-top:18px;
}

.agent-photo-history summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  font-size:18px;
  font-weight:900;
  color:#102942;
  list-style:none;
}

.agent-photo-history summary::-webkit-details-marker{
  display:none;
}

.agent-photo-history summary span{
  min-width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef3f6;
  font-size:12px;
}

.agent-history-list{
  margin-top:14px;
}

.agent-history-item{
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  gap:12px;
  padding:12px;
  border:1px solid #dfe8ef;
  border-radius:14px;
}

.agent-history-thumb{
  width:64px;
  height:64px;
  border-radius:12px;
  overflow:hidden;
  background:#eef3f6;
}

.agent-history-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.media-thumb-preview{width:72px;height:54px;aspect-ratio:4/3;border-radius:10px;font-size:1rem;flex:0 0 auto}
.thumbnail-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.thumbnail-choice{border:1px solid #dbe2e8;background:#fff;border-radius:12px;padding:8px;display:grid;gap:7px;text-align:left;color:#10243a}
.thumbnail-choice img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.thumbnail-choice span{font-size:.78rem;font-weight:700;overflow-wrap:anywhere}

.agent-history-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
}

.agent-history-copy small{
  color:#718399;
}

.agent-history-actions{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

@media(max-width:600px){
  .hm-modal-overlay{
    padding:14px;
  }

  .hm-modal-card{
    width:calc(100vw - 28px);
    max-height:84vh;
    padding:18px;
    border-radius:20px;
  }

  .agent-current-photo-wrap{
    min-height:220px;
  }

  .agent-current-photo{
    max-height:320px;
  }

  .agent-modal-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .agent-modal-actions .btn{
    width:100%;
  }
}

/* HM Migration Center — preview only */
.migration-warning{
  margin-bottom:16px;
}
.migration-stats{
  margin:16px 0;
}
.migration-scope{
  margin-top:16px;
}
.migration-list{
  display:grid;
  gap:10px;
}
.migration-row{
  background:var(--panel,#fff);
  border:1px solid var(--line,#e2e8ef);
  border-radius:16px;
  padding:15px;
}
.migration-main p{
  margin:8px 0 4px;
  color:var(--muted,#65768a);
}
.migration-main small{
  color:var(--muted,#65768a);
}
.migration-status{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.02em;
}
.migration-status.ready{
  background:#e7f6ed;
  color:#286347;
}
.migration-status.already-matched{
  background:#e8eff5;
  color:#31536a;
}
.migration-status.conflict{
  background:#fdecec;
  color:#9d2929;
}
.migration-status.manual-review{
  background:#fff5dd;
  color:#7b5b13;
}


/* HM canonical context switcher — production session bridge */
.header-context-select{
  width:auto;
  min-width:280px;
  max-width:440px;
  min-height:46px;
  border:1px solid #c6d4e1;
  background:#fff;
  color:#10243e;
  border-radius:14px;
  padding:10px 42px 10px 15px;
  font-size:14px;
  font-weight:800;
  line-height:1.3;
  box-shadow:0 4px 16px rgba(16,36,62,.06);
  outline:none;
}

.header-context-select:hover{
  border-color:#9fb5c9;
  box-shadow:0 5px 18px rgba(16,36,62,.09);
}

.header-context-select:focus{
  border-color:#668aa9;
  box-shadow:
    0 0 0 3px rgba(71,121,150,.15),
    0 5px 18px rgba(16,36,62,.08);
}

.header-context-select:disabled{
  opacity:.65;
  cursor:wait;
}

.header-access-pill{
  min-height:46px;
  max-width:440px;
  padding:10px 15px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  font-size:14px;
}

.header-account-btn{
  min-height:46px;
  max-width:220px;
  padding-left:15px;
  padding-right:15px;
}

@media(max-width:760px){
  .top{
    height:auto;
    min-height:76px;
    flex-wrap:wrap;
    padding:10px 0;
  }

  .top-actions{
    width:100%;
    order:3;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }

  .header-context-select,
  .header-access-pill{
    width:100%;
    min-width:0;
    max-width:none;
    font-size:13px;
  }

  .header-account-btn{
    max-width:135px;
  }
}

@media(max-width:430px){
  .top-actions{
    grid-template-columns:1fr;
  }

  .header-account-btn{
    width:100%;
    max-width:none;
  }
}

/* authui8 — exact equal-height canonical header controls */
:root{
  --hm-header-control-height:52px;
}

/*
 * Safari/iOS SELECT controls can look shorter than adjacent buttons even when
 * both use the same min-height.
 *
 * Use ONE exact fixed geometry and disable native SELECT appearance.
 */
.header-context-select,
.header-access-pill,
.header-account-btn{
  box-sizing:border-box !important;
  height:var(--hm-header-control-height) !important;
  min-height:var(--hm-header-control-height) !important;
  max-height:var(--hm-header-control-height) !important;
  border-radius:14px !important;
}

.header-context-select{
  -webkit-appearance:none !important;
  appearance:none !important;

  padding-top:0 !important;
  padding-bottom:0 !important;
  padding-left:15px !important;
  padding-right:44px !important;

  line-height:normal !important;

  background-color:#fff !important;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2310243e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;

  background-repeat:no-repeat !important;
  background-position:right 15px center !important;
  background-size:18px 18px !important;
}

.header-access-pill,
.header-account-btn{
  display:inline-flex !important;
  align-items:center !important;
  line-height:normal !important;
}

.header-account-btn{
  justify-content:center !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}


@media(max-width:760px){

  .header-context-select,
  .header-access-pill,
  .header-account-btn{
    height:var(--hm-header-control-height) !important;
    min-height:var(--hm-header-control-height) !important;
    max-height:var(--hm-header-control-height) !important;
  }
}

/* authui8 — keep original brand typography; only make the original div clickable */
.brand[data-nav="home"]{
  cursor:pointer;
}

.upload-progress{margin-top:12px;padding:12px;border:1px solid #d8e4eb;border-radius:12px;background:#f7fafc}.upload-progress .row{margin-bottom:8px}.upload-track{height:9px;border-radius:999px;background:#dfe8ed;overflow:hidden}.upload-track span{display:block;height:100%;width:0;background:#d59b2d;transition:width .15s ease}.upload-progress small{display:block;margin-top:7px;color:#536779}.upload-progress.success .upload-track span{background:#2f8f62}.upload-progress.error{border-color:#c75b5b;background:#fff7f7}.upload-progress.error .upload-track span{background:#c75b5b}[data-busy="true"]{cursor:wait;opacity:.78}.btn:disabled,.tiny-btn:disabled,button:disabled{cursor:not-allowed}

/* =========================================================
   Users & Access UX — 2026-10 corrective bundle
   ========================================================= */

.directory-filters{
  display:grid;
  grid-template-columns:minmax(220px,2fr) repeat(3,minmax(145px,1fr)) auto;
  gap:10px;
  align-items:center;
}

.directory-search-shell{
  position:relative;
  display:flex;
  align-items:center;
}

.directory-search-icon{
  position:absolute;
  left:13px;
  pointer-events:none;
  opacity:.55;
  z-index:1;
}

.directory-search-input{
  width:100%;
  padding-left:38px!important;
}

.directory-grid{
  display:grid;
  gap:10px;
}

.directory-card{
  width:100%;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  text-align:left;
}

.directory-card-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.directory-card-main strong,
.directory-card-main small{
  overflow-wrap:anywhere;
}

.directory-manage{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  white-space:nowrap;
  font-weight:700;
}

#directory-user-form h3{
  margin-top:18px;
  margin-bottom:8px;
}

#directory-user-form .list{
  display:grid;
  gap:8px;
}

#directory-user-form .list-item{
  border:1px solid rgba(20,35,55,.09);
  border-radius:12px;
  padding:11px 12px;
  background:#fff;
}

#directory-user-form [name="grant_unit_name"]:disabled{
  opacity:.5;
  cursor:not-allowed;
  background:#f2f4f6;
}

.selected-person-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  padding:7px 10px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(20,35,55,.12);
  margin:3px;
}

.selected-person-chip img,
.selected-person-fallback{
  width:32px;
  height:32px;
  flex:0 0 32px;
  border-radius:9px;
  object-fit:cover;
}

.selected-person-fallback{
  display:grid;
  place-items:center;
  background:#eef1f4;
}

.selected-person-chip span:last-child{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.selected-person-chip strong,
.selected-person-chip small{
  max-width:190px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:780px){
  .directory-filters{
    grid-template-columns:1fr;
  }

  .directory-card{
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
  }

  .directory-manage{
    min-width:72px;
  }

  #directory-user-form .two{
    grid-template-columns:1fr;
  }
}

/* Product closure — search, access, media selection and public collections */
.library-heading{align-items:center}
.library-result-count{margin:5px 0 0;color:#65768a;font-size:.82rem}
.library-actions,.filter-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.active-filter-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:10px 13px;border-radius:12px;background:#eaf1f5;color:#31536a;font-size:.8rem;font-weight:700}
.active-filter-row button{border:0;background:transparent;color:#0e3857;text-decoration:underline;font-weight:750}
.media-collections{display:grid;gap:28px}
.media-collection{min-width:0}
.collection-heading{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:0 2px 11px}
.collection-heading small{display:block;text-transform:uppercase;letter-spacing:.12em;font-weight:800}
.collection-heading h3{margin:3px 0 0;font-size:1.06rem}
.collection-heading>span{color:#65768a;font-size:.75rem}
.card-event{display:block;min-height:1.2em;margin-bottom:8px;color:#516579;font-size:.72rem;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.video-fallback{display:grid;place-items:center;width:54px;height:54px;padding-left:4px;border-radius:50%;background:#fff9;color:#294e6d;font-size:1.55rem}
.resource-access-note{margin-top:18px}

.preview main{width:100%;overflow:hidden}
.preview main .preview-video{display:block;width:min(100%,1200px);height:100%;min-height:220px;max-height:100%;background:#000;object-fit:contain}
.preview:fullscreen,.preview-video:fullscreen{background:#000}

.upload-source-picker{display:grid;gap:9px}
.upload-source-button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:10px 13px;border:1px solid #cfdce6;border-radius:12px;background:#fff;cursor:pointer}
.upload-source-button>span{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:8px 12px;border-radius:9px;background:#102b44;color:#fff;font-size:.8rem;font-weight:750}
.upload-source-button small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#65768a}
.upload-source-picker.has-file .upload-source-button{border-color:#477996;box-shadow:0 0 0 3px #47799618}
.upload-source-picker.has-file .upload-source-button small{color:#173b55;font-weight:700}
.upload-source-input:focus-visible+.upload-source-button{outline:3px solid #47799633;outline-offset:2px}
.upload-source-options{display:flex;gap:7px;flex-wrap:wrap}
.upload-source-options span{padding:5px 8px;border-radius:999px;background:#edf2f5;color:#4b6175;font-size:.7rem;font-weight:700}
.upload-source-hint,.upload-source-note{color:#65768a;font-size:.72rem;line-height:1.35}
.task-upload-row{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:10px;align-items:end}

.people-picker{display:grid;gap:12px;padding-top:2px}
.people-results:empty{display:none}
.person-result{grid-template-columns:minmax(0,1fr) auto;align-items:center;text-align:left;color:inherit}
.person-result-identity{display:flex;align-items:center;gap:10px;min-width:0}
.person-result-identity img{width:44px;height:44px;flex:0 0 44px;border-radius:10px;object-fit:cover}
.person-result-identity>span:last-child{display:grid;min-width:0}
.person-result-identity strong,.person-result-identity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person-result-add{color:#0e3857;font-size:.76rem;font-weight:800}
.people-no-result{margin:0;padding:12px;border-radius:12px;background:#f3f6f8;color:#65768a;font-size:.8rem}
.selected-people{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.selected-people-head{flex:0 0 100%;display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.selected-people-head small,.selected-people-empty{color:#65768a;font-size:.74rem}
.selected-people-empty{margin:0}
.selected-person-chip{position:relative;padding-right:36px}
.selected-person-remove{position:absolute;right:6px;top:50%;width:27px;height:27px;transform:translateY(-50%);border:0;border-radius:50%;background:#eef1f4;color:#405367;font-size:1.05rem;line-height:1}
.request-people-list{display:grid;gap:8px}
.request-person-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px;border:1px solid #e2e9ef;border-radius:13px}
.request-person-row>img,.request-person-row>.selected-person-fallback{width:46px;height:46px;border-radius:11px;object-fit:cover}
.request-person-row>span:nth-child(2){display:grid;min-width:0}
.request-person-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#65768a}

.directory-filters{grid-template-columns:minmax(260px,1.25fr) minmax(520px,2fr) auto;align-items:center}
.directory-filter-selects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.directory-filter-selects select{width:100%;min-height:46px;border:1px solid #cfdce6;border-radius:12px;background:#fff;padding:8px 10px;color:#182d40}
.directory-filter-actions{display:flex;gap:8px;justify-content:flex-end}
.directory-summary{display:flex;align-items:start;justify-content:space-between;gap:14px;margin:14px 2px}
.directory-summary .directory-note{margin:0}
.directory-summary>strong{white-space:nowrap;color:#405367;font-size:.8rem}
.directory-card-dates{display:flex;flex-wrap:wrap;gap:5px 14px;margin-top:3px}
.directory-card-dates small{margin:0}
.directory-card-dates b{color:#405367;font-weight:750}
.account-state-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,1fr);gap:13px;align-items:center}
.account-enabled{display:flex;align-items:center;gap:10px;min-height:46px;padding:10px 12px;border:1px solid #dbe2e8;border-radius:12px}
.account-enabled>span{display:grid;gap:2px}
.account-enabled small{font-size:.72rem;color:#65768a}
.access-editor-section{padding:14px;border:1px solid #dfe6ec;border-radius:15px;background:#f8fafb}
#directory-user-form .access-editor-section h3{margin:0}
.access-editor-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:11px}
.access-editor-heading p{margin:4px 0 0;color:#65768a;font-size:.75rem}
.access-editor-heading>span{padding:5px 8px;border-radius:999px;background:#e8eff5;color:#43647c;font-size:.7rem;font-weight:800;white-space:nowrap}
#directory-user-form .access-revoke-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid #e0e6eb;border-radius:11px;background:#fff}
.access-revoke-row>span:first-child{display:grid;gap:2px}
.access-revoke-row small{color:#65768a;font-size:.72rem}
.revoke-control{display:flex;align-items:center;gap:7px;color:#9d2929;font-size:.76rem;font-weight:750;white-space:nowrap}
.directory-save-bar{position:static;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding:16px 0 2px;border-top:1px solid #dfe6ec;background:#fff}
.directory-save-bar small{color:#65768a}
.directory-history-section{margin-top:14px;padding:14px;border:1px solid #dfe6ec;border-radius:15px;background:#f8fafb}
.directory-history-section h3{margin:0!important}
.directory-history-list{display:grid;gap:8px}
.directory-history-item{display:grid;gap:4px;padding:11px 12px;border:1px solid #e0e6eb;border-radius:11px;background:#fff;overflow-wrap:anywhere}
.directory-history-item .row{justify-content:space-between}
.directory-history-item small{color:#65768a;line-height:1.4}
.directory-history-status{display:inline-flex;align-items:center;width:max-content;padding:4px 8px;border-radius:999px;background:#e8eff5;color:#43647c;font-size:.7rem;font-weight:800;text-transform:capitalize}

@media(max-width:780px){
  .library-heading{align-items:flex-start}
  .library-actions{justify-content:flex-start}
  .collection-heading{align-items:center}
  .preview{grid-template-rows:auto minmax(0,1fr) auto}
  .preview header,.preview footer{padding:10px 12px}
  .preview footer>span{flex:0 0 100%;font-size:.75rem}
  .preview footer .btn{min-height:40px;padding:9px 11px;font-size:.76rem}
  .preview main .preview-video{min-height:180px;width:100%}
  .task-upload-row{grid-template-columns:1fr}
  .directory-filters{grid-template-columns:1fr}
  .directory-filter-selects{grid-template-columns:repeat(2,minmax(0,1fr))}
  .directory-filter-actions>*{flex:1}
  .directory-summary{align-items:baseline}
  .account-state-row{grid-template-columns:1fr}
  .access-editor-heading{align-items:center}
  #directory-user-form .access-revoke-row{align-items:flex-start;flex-direction:column}
  .directory-save-bar{align-items:stretch;flex-direction:column}
  .directory-save-bar .btn{width:100%}
  .directory-card-dates{display:grid;gap:3px}
  .request-person-row{grid-template-columns:42px minmax(0,1fr)}
  .request-person-row>img,.request-person-row>.selected-person-fallback{width:42px;height:42px}
  .request-person-row>.tiny-btn{grid-column:1/-1;width:100%}
  .selected-people-head{align-items:flex-start;flex-direction:column;gap:2px}
}

/* HM Media UX v2 — responsive public library and touch-first playback */
.media-library-card{padding:0;text-align:left;color:inherit;width:100%;min-width:0;border:1px solid #e1e8ee;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.media-library-card:focus-visible,.frame-choice:focus-visible{outline:3px solid #f3ba51;outline-offset:3px}
.media-library-card:hover{box-shadow:0 12px 30px #10243a1c;transform:translateY(-1px)}
.media-library-thumb{aspect-ratio:16/9;position:relative}
.media-library-thumb img{width:100%;height:100%;object-fit:cover}
.media-video-indicator{position:absolute;left:12px;bottom:12px;width:42px;height:42px;border-radius:999px;display:grid;place-items:center;background:#081c30d9;color:#fff;font-size:1.15rem;pointer-events:none}
.media-library-card .card-body{display:grid;align-content:start;gap:4px;padding:12px 14px 15px;min-height:115px}
.media-library-card h3{font-size:clamp(.92rem,1.8vw,1.03rem);line-height:1.36;letter-spacing:-.015em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:3px 0 2px;overflow-wrap:anywhere}
.media-library-card .card-event{font-size:.76rem;white-space:normal;line-height:1.45;min-height:0;margin:0;overflow-wrap:anywhere}
.media-library-card .tag{justify-self:start}
.preview-video-stage{position:relative;width:100%;height:100%;display:grid;place-items:center;min-height:220px}
.preview-video-stage .preview-video{width:100%;height:100%;object-fit:contain}
.video-play-fallback{position:absolute;inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);min-height:64px;padding:12px 20px;border:0;border-radius:60px;background:#f5b94f;color:#081d31;display:flex;align-items:center;gap:12px;font-size:1.25rem;font-weight:850;box-shadow:0 8px 32px #0009}
.preview footer .btn,.preview header .tiny-btn{min-height:48px;min-width:48px;font-size:.88rem;padding:11px 14px}
.video-frame-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin:14px 0}
.frame-choice{border:1px solid #c9d7df;background:#fff;border-radius:12px;padding:7px;display:grid;gap:6px;color:#172e44;cursor:pointer;min-height:48px}
.frame-choice img{aspect-ratio:16/9;width:100%;object-fit:cover;border-radius:7px}
.frame-choice small{font-size:.77rem;font-weight:700}
.storage-review p{margin:8px 0 12px;line-height:1.5}
.storage-review-list{display:grid;gap:8px;max-height:320px;overflow:auto;margin-top:10px}
.storage-review-item{border-top:1px solid #d2b97d;padding:8px 2px;display:grid;gap:3px;overflow-wrap:anywhere}
.media-manager-details{min-width:0;max-width:480px;overflow-wrap:anywhere}
@media(max-width:480px){.media-library-card .card-body{padding:12px;min-height:105px}.media-library-thumb{aspect-ratio:16/9}.preview footer{gap:10px}.preview footer .btn{min-height:48px;font-size:.84rem}}

/* HM Media V2.1 visual acceptance — scoped and mobile-first */
.hm-modal-card:has(#directory-user-form){overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:16px;max-height:min(90dvh,860px)}
#directory-user-form{padding-bottom:8px}
#directory-user-form .add-access-section{scroll-margin-bottom:18px}
.agent-directory-note{margin:18px 2px 20px;line-height:1.6;max-width:75ch}
.media-library-thumb.is-video-empty{background:linear-gradient(145deg,#163b59 0%,#0a2139 64%,#071a2e 100%);color:#fff}
.media-library-thumb.is-video-empty::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 75% 18%,#ffffff1c,transparent 50%);pointer-events:none}
.media-library-thumb.is-video-empty .video-fallback{width:auto;height:auto;display:flex;flex-direction:column;gap:9px;background:none;padding:0;color:#fff;font-size:1rem;text-align:center}
.media-library-thumb.is-video-empty .video-fallback-icon{display:grid;place-items:center;width:58px;height:58px;padding-left:4px;border-radius:50%;background:#ffffffee;color:#123a58;font-size:1.35rem;box-shadow:0 8px 28px #0005}
.media-library-thumb.is-video-empty .video-fallback small{font-size:.76rem;font-weight:750;color:#dce7f0}
.media-library-card .card-event{color:#50677a}
@media(max-width:560px){
  .media-collection .grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .media-library-card .card-body{min-height:0;padding:14px 15px 17px}
  .media-library-card h3{font-size:1rem;line-height:1.4;-webkit-line-clamp:2}
  .media-library-thumb{aspect-ratio:16/9}
  .library-heading{align-items:center}
  .library-result-count{line-height:1.4}
  .collection-heading{align-items:flex-start}
  .collection-heading h3{overflow-wrap:anywhere}
  .hero{padding:26px 22px}
  .hero h1{font-size:clamp(1.7rem,6vw,2rem);max-width:23ch}
}
@media(max-width:600px){
  .hm-modal-overlay{padding:12px;align-items:center}
  .hm-modal-card:has(#directory-user-form){width:100%;max-height:calc(100dvh - 24px);padding:18px}
}


/* Isolated video-frame selection enhancement */
.frame-choice.selected{
  border-color:#17425f;
  background:#eaf4f8;
  box-shadow:0 0 0 2px #17425f;
}
.selected-frame-preview{
  margin:14px 0;
  display:grid;
  gap:7px;
}
.selected-frame-preview img{
  display:block;
  width:100%;
  max-height:48vh;
  aspect-ratio:16/9;
  object-fit:contain;
  border-radius:12px;
  background:#081d31;
}
.selected-frame-preview figcaption{
  font-size:.82rem;
  font-weight:750;
  color:#40586c;
}
/* Center preview footer buttons */
.preview footer .row.wrap > .btn{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.25;vertical-align:middle}

/* Official Photo Bank — frontend-only visual and preview improvements */
.official-bank-subtitle{font-size:.87rem;line-height:1.45;margin:8px 0 0;max-width:640px}
.official-bank-upload{margin-top:18px}
.official-bank-help{font-size:.86rem;line-height:1.5;margin-bottom:10px}
.agent-modal-actions>.btn{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.25;cursor:pointer}
.agent-modal-actions>.btn:disabled{cursor:not-allowed}
.official-photo-selected{margin-top:14px;padding:12px;border:1px solid #dbe5ed;border-radius:15px;background:#f3f7fa;display:flex;align-items:center;gap:14px}
.official-photo-selected[hidden]{display:none!important}
.official-photo-selected img{display:block;width:110px;height:110px;object-fit:contain;background:#eaf0f4;border-radius:12px}
.official-photo-selected-copy{min-width:0;display:grid;gap:5px;line-height:1.35}
.official-photo-selected-copy small{overflow-wrap:anywhere}
@media(max-width:600px){.agent-modal-actions{grid-template-columns:minmax(0,1fr)}.agent-modal-actions>.btn{width:100%;min-height:48px}.official-photo-selected img{width:90px;height:90px}}


/* HM Batch 1 — backend-V2.1-compatible visual improvements only */
.choice-card-group{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));margin-top:7px}
.choice-card{display:flex;align-items:flex-start;gap:12px;cursor:pointer;min-height:58px;padding:12px;border:1px solid #cad9e4;border-radius:13px;background:#fff}
.choice-card:has(input:checked){border-color:#17425f;background:#eaf4f8;box-shadow:inset 0 0 0 1px #17425f}
.choice-card:focus-within{outline:2px solid #17425f;outline-offset:2px}
.choice-card input{width:20px;min-height:20px;height:20px;margin:2px 0 0;flex:none;accent-color:#17425f}
.choice-card span{display:grid;gap:3px;line-height:1.25}
.choice-card small{font-size:.73rem;color:#5a6e7d}
@media(max-width:600px){
  .choice-card-group{grid-template-columns:minmax(0,1fr)}
  .choice-card{min-height:50px}
  #request-form>.btn{position:static!important;bottom:auto!important;width:100%}
  .hm-modal-card:has(#directory-user-form){max-height:calc(100dvh - 16px);padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .directory-filter-selects{grid-template-columns:minmax(0,1fr)}
  .directory-filter-selects select:last-child{grid-column:auto}
  .selected-person-chip{width:100%;margin:3px 0}
}


/* R301 PDF-08 — Public Media must remain one column at every width <= 560px. */
@media (max-width:560px){
  .media-collection .grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .media-library-card{border-radius:15px}
  .media-library-card .card-body{padding:9px 10px 12px;min-height:104px;gap:3px}
  .media-library-card h3{font-size:clamp(.78rem,3.4vw,.93rem);line-height:1.3;-webkit-line-clamp:3;margin:3px 0 2px}
  .media-library-card .card-event{font-size:.68rem;line-height:1.35}
  .media-library-card .tag{font-size:.57rem;padding:3px 6px}
  .media-library-thumb{aspect-ratio:4/3}
  .media-video-indicator{width:33px;height:33px;left:8px;bottom:8px;font-size:.88rem}
}
/* FE-UX03 — resilient visual image loading, no additional API/image derivatives */
.media-library-thumb:has(.media-progressive-image){background:#dce5ee;isolation:isolate}
.media-library-thumb .media-progressive-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s ease}
.media-library-thumb.media-image-ready .media-progressive-image{opacity:1}
.media-thumb-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:linear-gradient(105deg,#dce5ee 30%,#edf2f6 50%,#dce5ee 70%);background-size:200% 100%;animation:hm-preview-shimmer 1.6s ease-in-out infinite;color:#5f7387;text-align:center;padding:8px;z-index:0}
.media-thumb-mark{display:grid;place-items:center;border:1px solid #a5b5c4;border-radius:8px;width:39px;height:33px;font-weight:850;font-size:.88rem;letter-spacing:-.04em}
.media-thumb-loading-label{font-size:.65rem;line-height:1.15;font-weight:600}
.media-library-thumb.media-image-ready .media-thumb-placeholder{visibility:hidden;animation:none}
.media-library-thumb.media-image-failed .media-thumb-placeholder{animation:none;background:#e5ebf0}
.media-library-thumb .media-video-indicator{z-index:2}
@keyframes hm-preview-shimmer{to{background-position-x:-200%}}
@media (prefers-reduced-motion:reduce){.media-thumb-placeholder{animation:none}.media-library-thumb .media-progressive-image{transition:none}}

/* HM FE-UX03: prevent native iOS date-input min-content size from widening the
   entire media form grid; preserve the native calendar picker and all form data. */
#media-upload-form {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}
#media-upload-form .field,
#media-upload-form .two {
  min-width: 0;
  max-width: 100%;
}
#media-upload-form .field {
  grid-template-columns: minmax(0, 1fr);
}
#media-upload-form .two {
  grid-template-columns: minmax(0, 1fr);
}
#media-upload-form .field input,
#media-upload-form .field select,
#media-upload-form .field textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
#media-upload-form input[type="date"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  font-size: 16px;
  line-height: 1.3;
}
@media (min-width: 700px) {
  #media-upload-form .two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* HM CORP — avatar enhancement */
.hm-agent-portrait{
  width:68px!important;
  height:68px!important;
  min-width:68px;
  flex:0 0 68px;
  border-radius:16px!important;
  background:linear-gradient(145deg,#e8eef5,#f8fafc)!important;
  border:1px solid #d5e0e9;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.hm-agent-portrait img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hm-avatar-placeholder{
  display:flex;
  width:100%;
  height:100%;
  align-items:center;
  justify-content:center;
}
.hm-avatar-placeholder svg{
  display:block;
  width:52px;
  height:52px;
  flex-shrink:0;
}
/* HM Corp UsersV2 — UI Polish R3 */
.hm-agent-card{min-width:0}
.hm-agent-card>.hm-agent-list-row{
 display:grid;grid-template-columns:minmax(0,1fr) auto;
 gap:14px;align-items:start;width:100%;min-width:0
}
.hm-agent-card .hm-agent-main{
 display:grid;grid-template-columns:72px minmax(0,1fr);
 gap:13px;align-items:start;min-width:0;width:100%
}
.hm-agent-card .hm-agent-main>div:last-child{
 min-width:0;overflow-wrap:anywhere
}
.hm-agent-card .hm-agent-portrait{
 box-sizing:border-box;
 width:72px!important;height:72px!important;
 min-width:72px!important;max-width:72px!important;
 min-height:72px!important;max-height:72px!important;
 flex:none!important;aspect-ratio:1/1!important;
 display:grid!important;place-items:center!important;
 overflow:hidden!important;position:relative;
 border-radius:14px!important;
 background:#e8eef4!important;border:1px solid #ccd9e4
}
.hm-agent-card .hm-avatar-placeholder{
 display:grid;place-items:center;width:100%;height:100%
}
.hm-agent-card .hm-avatar-placeholder svg{
 display:block;width:58px;height:58px;
 max-width:100%;max-height:100%;flex:none
}
.hm-agent-card .hm-agent-portrait img{
 width:100%;height:100%;max-width:100%;max-height:100%
}
.hm-agent-card .directory-chips{
 display:flex;flex-wrap:wrap;gap:6px;
 margin-top:8px;min-width:0
}
.hm-agent-card .directory-chip{
 max-width:100%;white-space:normal;overflow-wrap:anywhere
}
.hm-agent-card .hm-agent-list-row>.tiny-btn{
 white-space:nowrap;min-height:42px;justify-self:end
}
.nav button{
 min-height:58px;border-radius:12px;
 transition:color .14s ease
}
.nav .ico{
 width:34px;height:34px;display:grid;place-items:center;
 border:1px solid transparent;border-radius:11px;
 transition:background .14s ease,border-color .14s ease
}
.nav .ico svg{width:22px;height:22px;display:block}
.nav button.active .ico{
 background:#e6eef5;color:#123451;border-color:#c9d9e5
}
.nav button.active{color:#102f48}
.nav button:focus-visible{
 outline:2px solid #ce3440;outline-offset:2px
}
@media(max-width:620px){
 .hm-agent-card>.hm-agent-list-row{
  grid-template-columns:minmax(0,1fr);gap:10px
 }
 .hm-agent-card .hm-agent-list-row>.tiny-btn{
  justify-self:end
 }
}
@media(prefers-reduced-motion:reduce){
 .nav button,.nav .ico{transition:none}
}

/* AM11-AM12 scoped account styles */
/* Group A account and identity-scoped official-photo controls */
.account-page{max-width:720px;margin:24px auto;display:grid;gap:16px}
.account-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:10px;margin-top:8px}
.account-photo-frame{width:min(100%,220px);overflow:hidden;border-radius:18px;background:#e7eef3}
.account-photo-current{display:block;width:100%;aspect-ratio:1;object-fit:cover;transform-origin:center}
.protected-profile-fields input[readonly]{background:#f1f4f6;color:#3c5264;cursor:not-allowed}
.current-official{display:grid;gap:8px;max-width:220px;margin:15px auto;text-align:center}
.current-official-frame,.official-photo-history-frame{display:block;overflow:hidden;border-radius:16px;background:#e7eef3}
.current-official img{display:block;width:100%;aspect-ratio:1;object-fit:cover;transform-origin:center}
.current-official small{font-size:.74rem;font-weight:720;color:#587083}
.photo-editor{display:grid;gap:15px;padding:14px;border:1px solid #d7e4ed;border-radius:16px;background:#f7fafc}
.photo-editor-display{position:relative;width:min(100%,300px);aspect-ratio:1;overflow:hidden;margin:0 auto;border-radius:14px;border:2px solid #e4e9ed;background:#deebf1;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.photo-editor-display:active{cursor:grabbing}
.photo-editor-display.circle{border-radius:50%}
.photo-editor-display.portrait{width:min(100%,240px);aspect-ratio:9/16}
.photo-editor-display img{position:absolute;display:block;max-width:none;width:auto;height:auto;object-fit:fill;transform:none;pointer-events:none;user-select:none;-webkit-user-drag:none}
.photo-editor input[type="range"]{display:block;width:100%;margin:5px 0 16px;accent-color:#153c57}
.official-photo-history img{display:block;width:66px;height:66px;object-fit:cover;transform-origin:center}
img[data-photo-shape="circle"]{border-radius:50%}
.current-official img[data-photo-shape="portrait"],.account-photo-current[data-photo-shape="portrait"]{aspect-ratio:9/16}

@media(max-width:600px){.account-page h1{font-size:clamp(1.5rem,6vw,2.3rem)}}

/* AM12 circle-only image positioning: native pointer pan/pinch, keyboard slider fallback. */
.photo-editor-gesture-hint{font-size:.86rem;color:#486174;text-align:center;line-height:1.45}
.photo-editor-advanced{border:1px solid #d7e4ed;border-radius:12px;padding:9px 12px;background:#fff}
.photo-editor-advanced>summary{cursor:pointer;font-weight:650}
.photo-editor-advanced>label{display:block;margin:12px 0 4px}
.photo-editor-display{overscroll-behavior:contain}
@media(max-width:600px){.photo-editor{padding:10px;gap:12px}.photo-editor-display{width:min(100%,260px)}}

/* Staging AM11 pending photo is visible but never mislabelled approved. */
.pending-photo-list{display:grid;gap:12px;margin:14px 0}
.account-pending-photo{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid #dbe5ee;border-radius:14px;background:#f7fafc}
.account-pending-thumb{flex:0 0 82px;width:82px;height:82px;overflow:hidden;border-radius:50%;background:#e7edf3;display:grid;place-items:center}
.account-pending-thumb img{height:100%;width:100%;object-fit:cover;border-radius:50%}
.account-pending-photo p{font-size:.85rem;margin:6px 0 0}
@media(max-width:600px){.account-pending-thumb{flex-basis:64px;width:64px;height:64px}.account-pending-photo{padding:10px;gap:10px}}

.bank-photo-status{display:block;color:#516878;font-weight:650;margin-top:5px}

/* R347: existing LIVE public media accepts two cards per row at <=560px,
   10px gap, without touching internal directory/form grids. */
@media (max-width:560px) {
 .media-collection .grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
 .nav button { min-height:50px; }
 .nav .ico { width:26px;height:24px; }
 .nav .ico svg { width:20px;height:20px; }
}
@media (min-width:561px) and (max-width:699px) {
 .nav button { min-height:50px; }
 .nav .ico { width:26px;height:24px; }
 .nav .ico svg { width:20px;height:20px; }
}

/* R348: guest PDF access is an authenticated-only feature. */
.guest-pdf-gate{max-width:680px;margin:24px auto;padding:clamp(22px,4vw,36px)}
.guest-pdf-gate p{line-height:1.6}.guest-pdf-gate .btn{margin-top:12px}
