/* Scoped to the new controls: no global header/button selectors. */
.ewn-ready .epw-company-entry,.ewn-ready .epic-mode-switch,.ewn-ready #organizationSwitcherWrap,.ewn-ready #globalBackBtn,.ewn-ready .global-back-divider{display:none!important}
.ewn-switch-area,.ewn-home-company,.ewn-dialog,.ewn-find,.ewn-assurance,.ewn-back{box-sizing:border-box;font-family:Arial,"Apple SD Gothic Neo","Noto Sans KR",sans-serif}
.ewn-switch-area{color:#153647;margin:0 0 18px;min-width:0}
#mainContent>.ewn-switch-area{padding:16px 24px 0;margin:0;background:#f4f7f8}
.ewn-switch-tabs{display:grid;grid-template-columns:minmax(94px,1fr) minmax(120px,1.5fr) 44px;gap:4px;padding:4px;border-radius:18px;background:#e7eeee;min-width:0}
.ewn-switch-tabs .ewn-switch-button,.ewn-switch-tabs .ewn-choose{min-height:48px;min-width:0;border:0!important;background:#fff!important;color:#087f73!important;border-radius:14px;padding:10px 12px;font-size:16px;font-weight:750;line-height:1.3;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:none}
.ewn-switch-tabs .ewn-switch-button[aria-pressed=true]{background:#078376!important;color:#fff!important}
.ewn-switch-tabs .ewn-choose{font-size:27px;padding:0}
.ewn-switch-area .ewn-current{margin:10px 3px 0;color:#087f73;font-size:13px;line-height:1.5;font-weight:700;overflow-wrap:anywhere}
.ewn-back,.epw-screen .ewn-back,#app .ewn-back{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:58px;min-height:44px;border:0;background:transparent!important;color:#153647!important;font-size:15px;font-weight:700;box-shadow:none;padding:6px 8px;border-radius:10px;white-space:nowrap}
.ewn-ready .epw-header{gap:8px;flex-wrap:wrap}
.ewn-ready .epw-header>.ewn-back{order:-2}
.ewn-ready .epw-header>.epw-brand{margin-right:auto}
.ewn-ready .epw-header>.epw-account{gap:6px}
.ewn-ready .epw-header>.epw-account>span{display:none}
.ewn-home-company{margin:16px 0 12px;padding:20px;border:1px solid #d7e5e8;border-radius:20px;background:#fff;color:#153647}
.ewn-card-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.ewn-card-heading h2,.epw-screen .ewn-card-heading h2{font-size:15px;color:#657f89;margin:0}
.ewn-count{font-size:12px;font-weight:700;border-radius:20px;background:#e7f5ef;color:#087f73;padding:6px 13px}
.ewn-company-name{display:block;font-size:21px;line-height:1.4;overflow-wrap:anywhere}
.ewn-subtle,.epw-screen .ewn-subtle{font-size:14px;line-height:1.55;color:#637c88;margin:8px 0 13px;overflow-wrap:anywhere}
.ewn-primary,.epw-screen .ewn-primary{display:block;width:100%;min-height:48px;margin-top:12px;border:0;border-radius:12px;background:#078376!important;color:#fff!important;font-weight:750;font-size:16px;line-height:1.5;padding:12px 16px;overflow-wrap:anywhere}
.ewn-text,.epw-screen .ewn-text{display:block;width:100%;min-height:44px;background:transparent!important;color:#087f73!important;border:0;padding:12px 4px;font-weight:700;font-size:14px;text-align:left;white-space:normal;line-height:1.5}
.ewn-find,.epw-screen .ewn-find{display:block;width:100%;min-height:48px;padding:12px 18px;margin:12px 0;border:1.5px solid #078376!important;border-radius:13px;background:#fff!important;color:#087f73!important;font-size:16px;font-weight:750;text-align:left;line-height:1.5}
.ewn-assurance,.epw-screen .ewn-assurance{color:#68818c;font-size:12px;line-height:1.7;margin:10px 2px 18px}
.ewn-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #d6e4e7;border-radius:22px;background:#f4f7f8;color:#153647;overflow:auto;box-shadow:0 24px 80px #0e344835}
.ewn-dialog::backdrop{background:#0b293b80}
.ewn-chooser-content{padding:20px}
.ewn-dialog h1{font-size:24px;line-height:1.4;margin:12px 0 0;letter-spacing:-.7px}
.ewn-dialog h2{font-size:14px;line-height:1.6;color:#657f89;margin:22px 0 10px}
.ewn-company-option,.epw-screen .ewn-company-option{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:72px;margin:10px 0;padding:18px;border:1px solid #d7e5e8!important;border-radius:17px;background:#fff!important;color:#153647!important;text-align:left;line-height:1.5;white-space:normal;box-shadow:none}
.ewn-company-option.current,.epw-screen .ewn-company-option.current{border-color:#a5d7c6!important;background:#e7f5ef!important;color:#087f73!important;font-weight:700}
.ewn-company-copy{min-width:0;display:flex;flex-direction:column;gap:6px;flex:1}
.ewn-company-copy strong{font-size:17px;line-height:1.45;overflow-wrap:anywhere}
.ewn-company-copy small{font-size:13px;color:#69818c;overflow-wrap:anywhere}
.ewn-open-label{flex:none;color:#087f73;font-size:14px;font-weight:700}
.ewn-company-option.unavailable,.epw-screen .ewn-company-option.unavailable{background:#eaf0f2!important;color:#68808b!important;opacity:1!important;cursor:default}
.ewn-status{flex:none;background:#e0e8eb;border-radius:20px;color:#6c8089;font-size:12px;padding:6px 10px}
.ewn-chooser-footer{margin-top:22px;padding-top:4px;border-top:1px solid #d6e4e7}
.ewn-chooser-footer>.ewn-text{text-align:center}
.ewn-discovery>.ewn-back{margin:0 0 6px;padding-left:0}
.ewn-dialog button:focus-visible,.ewn-switch-area button:focus-visible,.ewn-home-company button:focus-visible,.ewn-find:focus-visible,.ewn-back:focus-visible{outline:3px solid #22ac96;outline-offset:3px}
.ewn-dialog button:disabled,.ewn-switch-area button:disabled,.ewn-home-company button:disabled{cursor:wait;opacity:.6}
@media(max-width:600px){
 #mainContent>.ewn-switch-area{padding:12px 12px 0}
 .ewn-switch-tabs{grid-template-columns:minmax(82px,1fr) minmax(100px,1.4fr) 44px}
 .ewn-switch-tabs .ewn-switch-button{font-size:14px;padding:10px 8px}
 .ewn-ready .epw-header{padding-left:12px;padding-right:12px}
 .ewn-ready .epw-header .epw-brand>strong{font-size:18px}
 .ewn-ready .epw-header .epw-brand>span{width:34px;height:34px;font-size:31px}
 .ewn-ready .epw-header .epw-brand small{display:none}
 .ewn-home-company{padding:17px}
 .ewn-chooser-content{padding:16px}
 .ewn-dialog h1{font-size:22px}
 .ewn-company-option,.epw-screen .ewn-company-option{padding:16px 13px;gap:10px}
 .ewn-status{font-size:11px;padding:5px 8px}
}
@media(max-width:350px){.ewn-ready .epw-header .epw-account{margin-left:auto}.ewn-ready .epw-header .epw-brand>strong{font-size:17px}.ewn-ready .epw-header .epw-brand{gap:6px}.ewn-back,.epw-screen .ewn-back,#app .ewn-back{min-width:50px;padding:6px}.ewn-company-copy strong{font-size:16px}}

/* Received invitations are personal participation, not company administration. */
#personalMembershipInbox[hidden]{display:none!important}

/* 223: one visual mode-switch layout in both contexts; routes and permissions stay original. */
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs{display:grid;grid-template-columns:minmax(90px,.65fr) minmax(0,1fr) 44px;gap:5px;padding:0;border-radius:10px;background:transparent;min-width:0}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs [data-workspace-action="company"]{grid-column:2;grid-row:1}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs [data-workspace-action="choose"]{grid-column:3;grid-row:1}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs [data-workspace-action="personal"]{grid-column:1;grid-row:1}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs :is(.ewn-switch-button,.ewn-choose){min-height:44px;border-radius:9px;padding:6px 8px;font-size:13px;background:#fff!important;color:#0c4336!important}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-tabs .ewn-switch-button[aria-pressed="true"]{background:#0c4336!important;color:#fff!important}
.ewn-ready :is(#app.workspace-theme,.epw-screen) .ewn-switch-area .ewn-current{font-size:11px;line-height:1.3;margin:4px 0 0;color:#446257}
.epw-screen .ewn-switch-area{margin:0 0 12px;background:#f6f7ef}
.epw-screen .ewn-home-company{border-radius:14px;border-color:#e0e6da;padding:16px;color:#174b35}
.epw-screen :is(.ewn-primary,.ewn-find){border-radius:9px;min-height:44px;font-size:14px}
.epw-screen .ewn-primary{background:#145b43!important;color:#fff!important}
.epw-screen :is(.ewn-find,.ewn-text){color:#145b43!important;border-color:#c8d8cc!important}

/* v239: single space selector; keep every existing company dashboard section. */
.ewn-ready .ewn-header239 .ewn-switch239{margin:0;flex:1;min-width:0;padding:0;background:transparent}
.ewn-ready .ewn-header239 .ewn-space239{display:block;width:100%;min-height:44px;padding:8px 4px;border:0!important;background:transparent!important;color:#153647!important;font-size:18px;font-weight:800;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-shadow:none}
.ewn-ready .ewn-header239 .ewn-current{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.ewn-ready .ewn-header239 .header-brand-block,.ewn-ready .ewn-header239>.epw-brand{display:none!important}
.ewn-ready .ewn-header239{display:flex;flex-wrap:nowrap;gap:8px}
.ewn-mywork239{padding:4px 4px 14px;margin:0 0 12px;border-bottom:1px solid #d8e5e7}
.ewn-mywork239 .ewn-text{width:auto;padding:6px 0;font-size:16px}
.ewn-mywork239 .ewn-subtle{font-size:12px;margin:0}
.ewn-switch239 .ewn-space239:focus-visible{outline:3px solid #078376;outline-offset:2px}
@media(max-width:480px){.ewn-ready .ewn-header239 .ewn-space239{font-size:16px}.ewn-ready .ewn-header239>.ewn-back{font-size:12px;min-width:44px;padding:4px}.ewn-ready .ewn-header239 .epw-account{font-size:12px}.ewn-ready .ewn-header239 .epw-account>button{padding:6px}}
